-
Bug
-
Resolution: Fixed
-
Normal
-
6.5.7, 7.0.5
-
Security Level: Jimmy
-
ZK 7.0.7
-
None
Reproduce steps:
1. Scroll to most bottom and click on item98 to select it.
2. Click "Switch to smaller model" button. The scrollbar position is incorrectly.
Reproducible sample:
<zk> <window border="normal" title="hello"> <zscript><![CDATA[ DefaultTreeNode root = new DefaultTreeNode("root", new ArrayList()); for (int i = 0; i < 99; i++) { root.add(new DefaultTreeNode("item " + i)); } DefaultTreeModel model = new DefaultTreeModel(root); void invalidate() { root.getChildren().clear(); root.getChildren().add(new DefaultTreeNode("New item")); tree.setModel(new DefaultTreeModel(root)); tree.invalidate(); } ]]></zscript> <button id="btn" label="Switch to smaller model" onClick="invalidate()" /> <vlayout height="100px" width="200px"> <tree id="tree" model="${model}" vflex="1"> <treecols> <treecol label="Treecol" /> </treecols> </tree> </vlayout> </window> </zk>
- relates to
-
ZK-4804 tree: incorrect scroll position, after model replace (renders incomplete)
- Closed