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

listbox wrong scroll-height caused by focus-a position

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.2
    • 8.5.1.2
    • Components
    • Security Level: Jimmy
    • ZK 8.5.2 S1, ZK 8.5.2 S2

      Steps to Reproduce

      run the attached example grouplist-focus-position.zul

      A (broken case)
      1) scroll down
      2) check "item 2-5"
      3) scroll up
      4) collapse "group 2"

      B (working case)
      1) scroll down
      2) check "item 2-1"
      3) scroll up
      4) collapse "group 2"

      Current Result

      in case A the vertical scrollbar remains even though all collapsed groups fit into the scrollable area
      where in case B the scrollbar disappears as expected

      Expected Result

      In both cases A and B the scroll bar should disappear

      Root Cause

      in case A the hidden focus-a keeps its css-top position causing the scrollable area to extended showing an unnecessary scrollbar

      Workaround

      focussing the group item when during onOpen fixes the focus anchor position

      <listgroup id="group2" label="group 2" open="true" onOpen="self.focus()"/>
      

            klyvechen klyvechen
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified