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

Previous and next arrows in calendar control trigger onbeforeunload in IE<=10

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 7.0.5
    • Fix Version/s: 7.0.6
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Reproducing steps:

      1. Open the sample zul page in IE version <= 10
      2. Click the calendar icon to open the calendar control
      3. Click the previous or next arrow
      -> it is a bug if "beforeUnload invoked" log message appears

      Reproducing sample:

      <window width="100%" height="100%" border="normal" title="ZK ${desktop.webApp.version}">
          <script type="text/javascript"><![CDATA[
              zk.afterMount(function () {
                  zk.beforeUnload(function() {
                      zk.log("invoke beforeUnload") 
                  });
              });
          ]]></script>
          <datebox />
      </window>
      

      Workaround:

      Apply the following script

      zk.afterLoad('zul.db', function() {
          var xCalendar = {};
          zk.override(zul.db.Calendar.prototype, xCalendar, {
              _clickArrow: function(evt) {
                  xCalendar._clickArrow.apply(this, arguments);
                  if (zk.ie < 11) {
                      evt.stop({dom:true});
                  }
              }
          });     
      });
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ChunfuChang ChunfuChang
                Reporter:
                neillee neillee
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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