-
Bug
-
Resolution: Fixed
-
Normal
-
8.5.1, 9.5.0.2
-
Security Level: Jimmy
Steps to Reproduce
run the simplified attached example tree-remains-empty-zk4804.zul
or this zkfiddle
scroll to about half the height (around item 4000)
click "remove TreeModel" (sets model to null)
click "add TreeModel"
Current Result
tree fails to render contents correctly (not always, seems timing dependent)
the tree remains at the current scroll position (even after clearing the model)
Expected Result
when the model is set to null, the scroll position should to reset to top
Debug Information
even calling tree.invalidate() after clearing and adding a tree model fixes the issue.
Workaround
call the private method tree.resetPosition(false) via reflection