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

Caption have a default tabindex of 0

XMLWordPrintable

    • ZK 8.0.4 S1

      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

            wenninghsu wenninghsu
            MDuchemin MDuchemin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m