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

Scrollable menubar infinite loop in zoomed browser

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.5
    • Fix Version/s: 8.5.0
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • Environment:

      Chrome Version 56.0.2924.87 (64-bit)

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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