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

alert during onClientInfo cause disabled request and UI stuck

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.5.1
    • 9.0.0, 9.0.1
    • Components
    • Security Level: Jimmy
    • ZK 9.5.1 S1

      Steps to Reproduce

      https://zkfiddle.org/sample/2507bb7/3-Exception-during-clientInfo

      run fiddle

      Current Result

      processing mask prevents UI usage,

      zAu.disabledRequest  prevents events to fire

      Expected Result

      Client should resume normal operations after closing alert

      Debug Information

      onCreate will cause a zAu.cmd0.alert showing the exception

      This alert set zAu.disabledRequest to true, which prevents request from being set, but doesn't prevent onClientInfo from triggering startProcessing

      This cause the UI to not fire more events, and wait in an unusable state

      Workaround

      prevent zAu.cm0.alert from disabling the requests

       

          <script><![CDATA[
              zk.afterLoad("zk", function () {
               var _xzAu = {};
               zk.override(zAu.cmd0, _xzAu, {
                      alert: function (msg, title, icon, disabledAuRequest) {
                          if (disabledAuRequest){
                              //zAu.disabledRequest = true;
                              console.log("skipped disableRequest");
                          }
                          jq.alert(msg, {icon: icon || 'ERROR', title: title});
                      }
               });
              });
          ]]></script>
      

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

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h