diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/css/var/getStyles.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/css/var/getStyles.js b/src/css/var/getStyles.js index 0d1d51af6..31dfc298e 100644 --- a/src/css/var/getStyles.js +++ b/src/css/var/getStyles.js @@ -1,12 +1,15 @@ define(function() { return function( elem ) { + // Support: IE<=11+, Firefox<=30+ (#15098, #14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - if ( elem.ownerDocument.defaultView.opener ) { - return elem.ownerDocument.defaultView.getComputedStyle( elem ); + var view = elem.ownerDocument.defaultView; + + if ( !view.opener ) { + view = window; } - return window.getComputedStyle( elem ); + return view.getComputedStyle( elem ); }; }); |