I know, it sounds like the Loch Ness monster, but hear me out.
This is a bug that only occurs on mobile, and specifically in the Safari browser (tested on the latest IOS version, iPhone 14 pro, as of today)
Consider the test case below with a split pane.
It has a tree to the left with an SVG image above it. When you click the tree, you come to a detail pane with a back button. When you press it, you get back to the nav pane.
I use showDetailPane() and showNavigationPane(), standard fare.
However - when I call deselectAllRecords on the tree as you can see in the click handler for the backbitten - the SVG disappears! Crazy stuff.
if I just call showNavigationPane() it works.
If I instead call deselectRecord(0), it also works.
It works with another file format, but it also seems to work with the regular GWT image.
Please tell me I'm not seeing things.
EDIT: my current workaround...:
code for test case:
This is a bug that only occurs on mobile, and specifically in the Safari browser (tested on the latest IOS version, iPhone 14 pro, as of today)
Consider the test case below with a split pane.
It has a tree to the left with an SVG image above it. When you click the tree, you come to a detail pane with a back button. When you press it, you get back to the nav pane.
I use showDetailPane() and showNavigationPane(), standard fare.
However - when I call deselectAllRecords on the tree as you can see in the click handler for the backbitten - the SVG disappears! Crazy stuff.
if I just call showNavigationPane() it works.
If I instead call deselectRecord(0), it also works.
It works with another file format, but it also seems to work with the regular GWT image.
Please tell me I'm not seeing things.
EDIT: my current workaround...:
Code:
TreeNode selectedRecord = tree.getSelectedRecord(); int i = tree.getTree().indexOf(selectedRecord); tree.deselectRecord(i);
code for test case:
Code:
public void onModuleLoad() { SplitPane splitPaneMain = new SplitPane(); splitPaneMain.setShowDetailToolStrip(false); splitPaneMain.setShowNavigationBar(false); splitPaneMain.setWidth100().setHeight100(); TreeGrid navigationTreeGrid = new TreeGrid(); Tree navigationTree = new Tree(); navigationTreeGrid.setShowHeader(false); navigationTree.setData(new TreeNode[]{new TreeNode("Hello")}); navigationTreeGrid.setData(navigationTree); navigationTreeGrid.addClickHandler(event -> { splitPaneMain.showDetailPane(); }); VLayout navigationLayout = new VLayout(); navigationLayout.setBackgroundColor("blue"); Img logo = new Img("nuba_l.svg", 130, 36); logo.setAlign(Alignment.CENTER); logo.setLayoutAlign(Alignment.CENTER); Label label = new Label("Hello"); label.setBackgroundColor("white"); navigationLayout.addMember(label); navigationLayout.addMember(logo); navigationLayout.addMember(navigationTreeGrid); splitPaneMain.setNavigationPane(navigationLayout); VLayout layoutToolbars = new VLayout(); layoutToolbars.setMargin(10); layoutToolbars.setHeight(50); layoutToolbars.setMembersMargin(10); ToolStrip toolStripToolsNav = new ToolStrip(); toolStripToolsNav.setWidth100(); ToolStripButton tsBackButton = new ToolStripButton(); tsBackButton.setTitle("Back!"); toolStripToolsNav.addButton(tsBackButton); toolStripToolsNav.addClickHandler(event -> { splitPaneMain.showNavigationPane(); navigationTreeGrid.deselectAllRecords(); }); layoutToolbars.addMember(toolStripToolsNav); splitPaneMain.setDetailPane(layoutToolbars); splitPaneMain.draw(); }
Comment