-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.1
-
Security Level: Jimmy
-
ZK 8.0.4 S1
-
None
Steps to Reproduce
http://zkfiddle.org/sample/6eb1j5/1-caption-tabindex
run fiddle, click on 1st textbox, press tab.
Actual Result
caption receives focus, press again to focus 2nd textbox
Expected Result
focus should go directly on 2nd textbox, unless tabindex = 0 is defined on the caption
Debug Info
following ZK-2535, tabindex have a default value of 0 for caption
https://github.com/zkoss/zk/blob/master/zul/src/archive/web/js/zul/wgt/Caption.js#L23
Since caption is based on div, it would make more sense to have a default tabindex value of null / "" (empty string). If null / "" is not possible, -1 could also be a possible choice.
Root Cause
tabindex 0 is given as default for caption
Workaround
manually set tabindex -1 to the caption