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

selecting an item of a Listbox scrolls back to the top

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.2
    • 8.0.0, 8.6.0.1
    • None
    • Security Level: Jimmy
    • ZK 8.6.2 S1, ZK 8.6.2 S2

      Steps to Reproduce

          <listbox viewModel="@id('vm')@init('org.zkoss.reference.component.data.MultipleSelectionVM')" 
                   model="@load(vm.model)" rows="10" selectedItems="@bind(vm.selectedItems)">
              <listhead>
                  <listheader label="listbox header"/>
              </listhead>
              <template name="model">
                  <listitem label="${each}"/>
              </template>
          </listbox>
      

      1. open chrome developer tool / enable device toolbar
      2. select "iPad"
      3. scroll down to select 30th item

      Current Result

      Listbox scrolls up to the first item

      Expected Result

      keep the current scroll position

      debug info

      • .z-focus-a doesn't move to the position of the selected listitem.
      • _syncFocus() in listbox-touch.js doesn't move the focus element's position but _syncFocus() in SelectWidget.js moves the position.

      workaround

      attached js

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

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 4 hours Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - 4 hours Remaining Estimate - 4 hours
                4h