angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

ngSrc duplicate request for iframe in IE

Open Ilya-Hubich opened this issue 12 years ago • 21 comments

Hi.

I have the issue with iframe and ngSrc directive in IE 10 in Standard mode. When I set the ngSrc value it duplicate request for iframe resources. One of them is with status 'aborted' and another is '200 OK'.

But sometimes on the server side we get 2 requests instead of 1. It's critical for us because one of params(guid) should be unique, but when two same requests are sent the guids are the same too.

The jsfiddle exampe is here : http://jsfiddle.net/6au10sk4/4/

In angular source code i find :

Line:15704

      attr.$set(name, value);
      // on IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist
      // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need
      // to set the property as well to achieve the desired effect.
      // we use attr[attrName] value since $set can sanitize the url.
      if (msie && propName) element.prop(propName, attr[name]);
    });

I think here is the problem :

      if (msie && propName) element.prop(propName, attr[name]);

Ilya-Hubich avatar Oct 30 '14 14:10 Ilya-Hubich

@gkalpak - It is happening again in IE 1.1.17134.0 - Windows10

faizhal-ahamed avatar Oct 03 '18 21:10 faizhal-ahamed