Uploaded image for project: 'ZTL'
  1. ZTL
  2. ZTL-28

ztl.hasVScrollbar doesn't support mobile

    XMLWordPrintable

    Details

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

      iPad Air (iPadOS 14) Safari

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: