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

href with mailto in chrome remove target frame too early

    Details

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

      Chrome Version 57.0.2987.133 (64-bit)

      Description

      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>
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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