We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fed09b9 + 398ccf7 commit b6e0a00Copy full SHA for b6e0a00
src/utils.js
@@ -18,7 +18,11 @@ export const events = {
18
19
export const vendorPrefix = (function () {
20
if (typeof window === 'undefined' || typeof document === 'undefined') return ''; // server environment
21
- let styles = window.getComputedStyle(document.documentElement, '');
+ // fix for:
22
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=548397
23
+ // window.getComputedStyle() returns null inside an iframe with display: none
24
+ // in this case return an array with a fake mozilla style in it.
25
+ let styles = window.getComputedStyle(document.documentElement, '') || ['-moz-hidden-iframe'];
26
const pre = (Array.prototype.slice
27
.call(styles)
28
.join('')
0 commit comments