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

Vertical scroll appear when remove last listitem from Listbox

    Details

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

      Firefox/Chrome

      Description

      Pretty much what summary said.

      Here is the example code, click LAST item and then delete it with button.

      <div>
          <zscript>Object[] o = new Object[10];</zscript>
          <button id="btn" label="delete" onClick="deleteSelection();"/>
          <listbox id="list" width="300px" checkmark="true" multiple="true">
              <listhead>
                  <listheader>
                      <label value="Column"/>
                  </listheader>
              </listhead>
              <listitem forEach="${o}">
                  <listcell label="value"/>
              </listitem>
          </listbox>
          <zscript>
              <![CDATA[
                  public void deleteSelection() {
                      for(Listitem item : list.getSelectedItems()) {
                          list.removeItemAt(item.getIndex());
                      }
                  }
              ]]>
          </zscript>
      </div>
      

      Currently "hack" is to overwrite CSS overflow property.

      <style>
          .no-scroll-bar .z-listbox-body {
             overflow: hidden;
          }
      </style>
      

        Attachments

          Activity

            People

            • Assignee:
              danchen0720 danchen0720
              Reporter:
              rangilin rangilin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: