Affects Version/s: 8.5.1, 22.214.171.124
Fix Version/s: 9.6.0
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"
tree fails to render contents correctly (not always, seems timing dependent)
the tree remains at the current scroll position (even after clearing the model)
when the model is set to null, the scroll position should to reset to top
even calling tree.invalidate() after clearing and adding a tree model fixes the issue.
call the private method tree.resetPosition(false) via reflection