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

Listbox with checkmark and droppable enabled, scrolls to top when first time checked

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.10
    • 5.0.9
    • None
    • Verified on Linux 3.0.0-1-amd64, Firefox 8.0

      1) Render a listbox with checkmark and droppable enabled
      2) Fix the height to visualize the vertical scrollbar
      3) Scroll down to last items and select one by clicking on the checkbox

      The listbox will scroll to top when it will be checked for the first time.

      To replicate this bug, please use the following source:


      <zk>
      Drag project to other list or same list for reorder
      <hbox>
      <listbox id="left" height="150px" width="200px" onDrop="move(event.dragged)" droppable="true" checkmark="true" multiple="true"
      oddRowSclass="non-odd">
      <listitem draggable="true" droppable="true" onDrop="move(event.dragged)">
      <listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Forge" />
      </listitem>
      <listitem draggable="true" droppable="true" onDrop="move(event.dragged)">
      <listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Mobile" />
      </listitem>
      <listitem draggable="true" droppable="true" onDrop="move(event.dragged)">
      <listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK GWT" />
      </listitem>
      <listitem draggable="true" droppable="true" onDrop="move(event.dragged)">
      <listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK JSF" />
      </listitem>
      <listitem draggable="true" droppable="true" onDrop="move(event.dragged)">
      <listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK JSP" />
      </listitem>
      <listitem draggable="true" droppable="true" onDrop="move(event.dragged)">
      <listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Spring" />
      </listitem>
      </listbox>
      <separator />
      <listbox id="right" height="150px" width="200px" checkmark="true"
      oddRowSclass="non-odd" onDrop="move(event.dragged)" droppable="true"
      multiple="true" >
      <listitem draggable="true" droppable="true" onDrop="move(event.dragged)">
      <listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK" />
      </listitem>
      <listitem draggable="true" droppable="true" onDrop="move(event.dragged)">
      <listcell src="/img/Centigrade-Widget-Icons/Briefcase-16x16.png" label="ZK Studio" />
      </listitem>
      </listbox>
      </hbox>
      <zscript>
      void move(Component dragged) {
      if (self instanceof Listitem) {
      if (dragged.getParent().getId().equals("right")) { self.parent.insertBefore(dragged, self.getNextSibling()); } else { self.parent.insertBefore(dragged, self.getNextSibling()); }
      } else { self.appendChild(dragged); }
      }
      </zscript>
      </zk>

            SimonPai SimonPai
            oticman oticman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: