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

button not focussable after it was autodisabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: Freshly, 7.0.7
    • Fix Version/s: 7.0.7, 8.0.1
    • Component/s: Components
    • Security Level: Jimmy
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 7.0.7

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jumperchen jumperchen
              Reporter:
              cor3000 cor3000
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

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