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

Scrollable menubar infinite loop in zoomed browser

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.0
    • 8.0.5
    • None
    • Security Level: Jimmy
    • None
    • Chrome Version 56.0.2924.87 (64-bit)

      Steps to Reproduce

      http://zkfiddle.org/sample/rigvcs/3-scrollable-menubar-infinite-loop-in-zoomed-browser
      Run fiddle.
      Use browser zoom to : 110%
      Scroll items in menubar

      Current Result

      After 1st click, menubar doesn't scroll.

      Expected Result

      Menubar should scroll regardless of zoom level

      Debug Info

      Caused by infinite loop in zul.menu.Menubar.prototype._moveTo
      _moveTo is called on interval to update the position of the scrollable area.
      if (currPos == moveDest) assume zoom level = 100% , and pixel = integer.
      Since the values never match, the loop keep running and no futher scroll action is possible.

      Root Cause

      https://github.com/zkoss/zk/blob/5754625fdceec45f391123b46b1149b6a4e8e61b/zul/src/archive/web/js/zul/menu/Menubar.js#L254

      Workaround

            bobpeng bobpeng
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d