Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4804

tree: incorrect scroll position, after model replace (renders incomplete)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.1, 9.5.0.2
    • Fix Version/s: 9.6.0
    • Component/s: Components
    • Security Level: Jimmy

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rudyhuang rudyhuang
              Reporter:
              cor3000 cor3000
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Time Spent - 4 hours Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - 4 hours Remaining Estimate - 4 hours
                  4h