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

The selection focus of Tree is not updated in Firefox

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.1
    • Fix Version/s: 9.5.1
    • Component/s: Browser Issue, Components
    • Labels:
    • Environment:

      Firefox 84.0b7 (64-bit)

    • gh.sprint.customfield.default.name:
      ZK 9.5.1 S1

      Description

      Steps to Reproduce

      https://zkfiddle.org/sample/jp09jm/1-ZK-4741
      1. Scroll the Tree and select any item below "root.200".
      2. Click Fewer model.
      3. You shouldn't see a blank Tree.

      Current Result

      See a blank Tree.

      Expected Result

      See treeitems.

      Debug Information

      https://github.com/zkoss/zk/blob/v8.0.1/zul/src/archive/web/js/zul/sel/Tree.js#L171
      https://github.com/zkoss/zk/blob/v8.0.1/zul/src/archive/web/js/zul/sel/SelectWidget.js#L1313

      // reset the anchor to the top;
      jq(this.$n('a')).offset({top: 0, left: 0});
      

      => original code https://github.com/zkoss/zk/blob/v5.0.13/zul/src/archive/web/js/zul/sel/Tree.js#L106

      https://api.jquery.com/offset/#offset-function
      The element's border-box position is specified relative to the document.
      To reset the anchor to the top (related to the tree body), just set top: 0.

      Before 8.0.1, the result is right but the code is still wrong (please see the attached screenshot)

      Workaround

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified