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

A modal window which 1st element doesn't have a tabindex will give focus to background element on tab focus.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • 7.0.7, 8.0.1
    • None
    • Security Level: Jimmy
    • ZK 8.0.2 S1

      When a modal window 1st control does not have a tabindex by default, background controls can be focused when using tab to navigate between controls.(any control rendered with <span> or <a> elements such as toolbar buttons).

      Reproduced with

      <zk>
      	<style>
      		.z-toolbarbutton:focus, .z-button:focus, .z-toolbar:focus { 
          		background-color: yellow;
      			border: 1px red solid;
      		}
      	</style>
      	<button></button>
      	<button></button>
      	<window mode="modal">
      		<toolbar>
      			<toolbarbutton label="toolbarbutton"></toolbarbutton>
      <!-- 			<toolbarbutton xmlns:w="client" w:onBind="this.$n().tabIndex = 0" label="toolbarbutton"></toolbarbutton> -->
      		</toolbar>
      		<button></button>
      		<button></button>
      		<button></button>
      	</window>
      </zk>
      

      replace the toolbarbutton by the commented line (toolbar button with a tabindex value), and the modal window is able to keep the focus.

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

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h