-
Bug
-
Resolution: Fixed
-
Normal
-
6.5.7
-
Security Level: Jimmy
-
None
Reproducible sample:
<zk> <label multiline="true"> 1. Scorll to bottom and select last listitem 2. Click "Unload tabbox" button 3. Click "Back" button. Excepted: scroll to selected listitem Actual: not scroll to selected listitem (happened to Firefox and IE, chrome works fine) </label> <window id="win" border="normal" title="hello" apply="demo.ScrollIntoViewComposer"> <button label="Unload tabbox" id="btn1" /> <button label="Back" id="btn2" /> <tabbox id="tabbox1"> <tabs> <tab label="tab1" /> </tabs> <tabpanels> <tabpanel> <listbox id="fileList" height="200px" mold="paging" pageSize="10"> <custom-attributes org.zkoss.zul.listbox.rod="true"/> <listhead sizable="true"> <listheader label="Col 1" width="150px" /> </listhead> </listbox> </tabpanel> </tabpanels> </tabbox> </window> </zk>
public class ScrollIntoViewComposer extends SelectorComposer<Window> { @Wire private Window win; @Wire private Tabbox tabbox1; @Wire private Listbox fileList; public void doAfterCompose(Window comp) throws Exception { super.doAfterCompose(comp); ListModelList<String> model = new ListModelList<String>(); for (int i = 0; i < 200; i++) model.add("" + i); fileList.setModel(model); } @Listen("onClick = #btn1") public void unload() { tabbox1.detach(); } @Listen("onClick = #btn2") public void back() { tabbox1.setParent(win); } }
Workaround:
Turn off ROD can resolve this issue.