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

href with mailto in chrome remove target frame too early

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.2
    • 8.0.4.2
    • None
    • Security Level: Jimmy
    • None
    • Chrome Version 57.0.2987.133 (64-bit)

      Steps to Reproduce

      run fiddle
      http://zkfiddle.org/sample/3t40cor/1-href-with-mailto-in-chrome
      click on the test link

      Current Result

      in other browser: the new email window opens in the default mail client
      in chrome Version 57.0.2987.133 (64-bit) : the new email window doesn't open

      Expected Result

      mail window should open in chrome too

      Debug Info

      mailto href is executed in a new iframe to aoid rmdesktop (end of desktop due to navigation out).
      It seem that chrome requires the iframe to exists longer than the current implementation

      Root Cause

      iframe is deleted too early

      Workaround

      	<script><![CDATA[
      		/*zk.afterLoad('zul.wgt', function() {
      			var xA = {};
      			zk.override(zul.wgt.A.prototype, xA ,{
      				doClick_ : function(b) {
      			        var c = this.getHref();
      			        if (c && c.toLowerCase().startsWith("mailto:")) {
      			            var a = jq.newFrame("mailtoFrame", c, null);
      			            setTimeout(function(){jq(a).remove()},100);
      			            b.stop()
      			        }
      			        if (zk.ie < 11 && !c) {
      			            b.stop({
      			                dom: true
      			            })
      			        }
      			        if (this._disabled) {
      			            b.stop()
      			        } else {
      			            zul.wgt.ADBS.autodisable(this);
      			            this.fireX(b);
      			            if (!b.stopped) {
      			                this.$super("doClick_", b, true)
      			            }
      			        }
      				}
      			});//zk.override
      		});//zk.afterLoad
      	]]></script>
      

            klyvechen klyvechen
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified