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

restore focus after showBusy/clearBusy

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Later Later
    • 8.6.3
    • 8.6.1
    • ZK Client Engine
    • Security Level: Jimmy
    • ZK 8.6.3 S1

      Steps to Reproduce

      run the example

      <zk>
          <zscript><![CDATA[
              public void startBusiness(Component comp) {
                  Clients.showBusy("I am busy!");
                  Events.echoEvent("onBusy", comp, null);
              }
              public void doBusiness(Component comp) {
                  Thread.sleep(2000);
                  Clients.clearBusy();
              }
          ]]></zscript>
          <textbox/>
          <textbox placeholder="focus me"
                  onFocus="startBusiness(self);"
                  onBusy="doBusiness(self)" />
          <textbox/>
      </zk>
      

      focus the textbox via keyboard tab or mouse click

      Current Result

      the focus is cleared during the busy animation (which is expected)
      after the busy animation the focus remains lost

      Expected Result

      restore the focus after a busy animation (if possible, i.e. componen hasn't been detached)

      Workaround

      restore the focus manually:
      however tricky in the example above since onFocus starts the busy operation again resulting in an endless loop

            rudyhuang rudyhuang
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 4 hours, 10 minutes Remaining Estimate - 3 hours, 50 minutes
                3h 50m
                Logged:
                Time Spent - 4 hours, 10 minutes Remaining Estimate - 3 hours, 50 minutes
                4h 10m