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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.6
    • 7.0.5
    • None
    • Security Level: Jimmy
    • None

      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});
                  }
              }
          });     
      });
      

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

              Created:
              Updated:
              Resolved:

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