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

Listbox doesn't keep scrollbar position when applying hflex="min" on a listheader in mobile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 10.1.0
    • 9.5.1
    • Components
    • iOS
      Android

    • None

      Steps to Reproduce

      <zk>
        <window border="normal" title="hello" >
          	<vbox>
                  <label multiline="true">
                      1. scroll to the far right in the listbox
                      2. click the button to fire CONTENTS_CHANGED fro first item in model
                      3. the horizontal scroll bar shouldn't scroll to the leftmost of the listbox
                  </label>
          ROD false
        	<listbox id="lb" mold="paging" width="300px" height="200px" >	
        	<custom-attributes org.zkoss.zul.listbox.rod="false"/>
                <listhead>
                  <listheader id="listheader2" label="col2" width="350px"/>            
                  <listheader id="listheader1" label="col1" hflex="min"/>
                </listhead>
                <template name="model">
                	<listitem>
                		<listcell>${each}</listcell>
                		<listcell>${each}</listcell>
                	</listitem>
                </template>
          	</listbox>
      	<button id="btn" label="Click to fire CONTENTS_CHANGED for first item in model." onClick="changeModel()"/>
        <zscript><![CDATA[
      	ListModelList model = new ListModelList();
      	model.add("a");
      	model.add("b");
      	lb.setModel(model);
      	public void changeModel() {
      		model.set(1, "replaced");
      	}
      ]]></zscript>
        </vbox>
        </window>
      </zk>
      

      Current Result

      the horizontal scroll bar scrolls to the leftmost of the listbox

      Expected Result

      the horizontal scroll bar shouldn't scroll to the leftmost of the listbox

      Debug Information

      also need to test in mobile

      Workaround


            DevChu DevChu
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: