ztl.hasVScrollbar doesn't support mobile

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • None
    • Affects Version/s: None
    • Component/s: Core
    • Environment:

      iPad Air (iPadOS 14) Safari

      Steps to Reproduce

      Use iPad Air Safari to test B70-ZK-2978.zul
      1. load this page
      2. open 2 groupbox
      3. should appear vertical scrollbar

      await t.expect(await ztl.hasVScrollbar({locator:Selector(() => jq('.menuGroupboxContainer')[0])})).ok();
      

      Current Result

      It returns false.

      Expected Result

      It returns true.

      Debug Information

      In mobile, if <custom-attributes org.zkoss.zul.nativebar="false"/> is used, iScroll will be used.

      And the native bar in mobile doesn't occupy any space, so offsetHeight - clientHeight is always 0. Use scrollHeight is safer.

      Workaround

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

              Created:
              Updated:
              Resolved: