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

opening a menupopup moves a scrollbar of a long menu back to top

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 10.0.0
    • 9.6.1
    • None
    • Security Level: Jimmy

      Steps to Reproduce

      1. scroll down to hover on the last menu

      Current Result

      the scroll bar goes back to the top position.
      submenu "last" doesn't open

      Expected Result

      the scroll bar keeps the current position and doesn't move.

      Debug Information

      • because .z-focus-a is always at the first child element (top) of the menupopup. When closing a sub menupopup and focus back to the parent menupupup's focus anchor. It also scrolls back to the top.
      • Before 9.6.0.2 (included), there is no such a bug.
      • caused by the fix of ZK-4598

      workaround

      zk-5235.js
      anc.focus(

      {preventScroll: true}

      );

      https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus

        1. menu-scroll.gif
          menu-scroll.gif
          69 kB
        2. zk-5235.js
          0.9 kB
        3. zk-5235.zul
          2 kB

            rebeccalai rebeccalai
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: