-
Bug
-
Resolution: Unresolved
-
Normal
-
8.0.4.1
-
Security Level: Jimmy
Steps to Reproduce
run the attached example focus-rod.zul
click the button
Actual Result
textbox in initial listitem is focussed (OK)
when new listitem is added the textbox is not focussed
Expected Result
when new listitem is added the textbox should also be focussed
Debug Info
this works as expected when ROD is disabled
<custom-attributes org.zkoss.zul.listbox.rod="false"/>
Root Cause
when calling self.focus() the AuFocus response object is correctly added to the reponses
https://github.com/zkoss/zk/blob/master/zk/src/org/zkoss/zk/ui/impl/UiVisualizer.java#L421
when rendering the response it get's removed during doCrop()
https://github.com/zkoss/zk/blob/master/zk/src/org/zkoss/zk/ui/impl/UiVisualizer.java#L654
Workaround
1. disable ROD
2. with ROD enabled: focussing the textbox directly using JS will prevent the response from being filtered out
Clients.evalJavaScript("zk.$('#" + self.getUuid() + "').focus();");
- blocks
-
ZK-4156 listbox rod performance
- Closed