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

button not focussable after it was autodisabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.7, 8.0.1
    • Freshly, 7.0.7
    • Components
    • Security Level: Jimmy
    • ZK 7.0.7
    • None

      run example below and click the "save" button
      expected behavior is that the "edit" button becomes visible and receives the focus
      -> this currently works in ZK 7.0.6.1
      -> in ZK 7.0.7 FL it fails to focus the previously autodisabled edit button

      <zk xmlns:w="client">
      	<button id="save" label="save" autodisable="save,edit">
      		<attribute name="onClick"><![CDATA[
      			save.setDisabled(true);
      			edit.setVisible(true);
      			edit.setFocus(true);
      		]]></attribute>
      	</button>
      	<button id="edit" label="edit" autodisable="save,edit">
      <!-- 		<attribute w:name="focus_"><![CDATA[ -->
      <!-- 			function(timeout) { -->
      <!-- 				console.log('focus', this.id, arguments); -->
      <!-- 				this.$focus_(timeout); -->
      <!-- 			} -->
      <!-- 		]]></attribute> -->
      <!-- 		<attribute w:name="setDisabled"><![CDATA[ -->
      <!-- 			function() { -->
      <!-- 				console.log('setDisabled', this.id, arguments); -->
      <!-- 				this.$setDisabled.apply(this, arguments);  -->
      <!-- 			} -->
      <!-- 		]]></attribute> -->
      		<attribute name="onClick"><![CDATA[
      			save.setDisabled(false);
      			edit.setVisible(false);
      			text.setFocus(true);
      		]]></attribute>
      	</button>
      
      	<textbox id="text"/>
      
      	<zscript><![CDATA[
      		edit.setVisible(false);
      		text.setFocus(true);
      	]]></zscript>
      </zk>
      

      when comparing version 7.0.6.1 to 7.0.7 the commented out log statements just help to debug the case, they are not necessary to reproduce the problem

            jumperchen jumperchen
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 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