-
Bug
-
Resolution: Fixed
-
Normal
-
9.5.1
-
iOS
Android
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
- relates to
-
ZK-2551 Listbox doesn't keep scrollbar position when applying hflex="min" on a listheader
- Closed