Skip to content
Permalink
Browse files

fix: Patch PR #594 (#597)

  • Loading branch information...
atomiks authored and FezVrasta committed Apr 3, 2018
1 parent bbf18e7 commit 8586db4c00b39deffd6382c5fb6448a64e53fbbf
Showing with 17 additions and 16 deletions.
  1. +2 −1 packages/popper/src/utils/debounce.js
  2. +1 −0 packages/popper/src/utils/isBrowser.js
  3. +14 −15 packages/popper/src/utils/isIE.js
@@ -1,4 +1,5 @@
const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
import isBrowser from './isBrowser';

const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
let timeoutDuration = 0;
for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {
@@ -0,0 +1 @@
export default typeof window !== 'undefined' && typeof document !== 'undefined';
@@ -1,22 +1,21 @@
import isBrowser from './isBrowser';

const isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
const isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);

/**
* Determines if the browser is Internet Explorer
* @method
* @memberof Popper.Utils
* @param {Number} version to check
* @returns {Boolean} isIE
*/
export default (() => {
const ua = navigator.userAgent;
const isIE11 = /Trident/.test(ua);
const isIE10 = /MSIE 10/.test(ua);

return version => {
if (version === 11) {
return isIE11;
}
if (version === 10) {
return isIE10;
}
return isIE11 || isIE10;
};
})();
export default function isIE(version) {
if (version === 11) {
return isIE11;
}
if (version === 10) {
return isIE10;
}
return isIE11 || isIE10;
}

0 comments on commit 8586db4

Please sign in to comment.
You can’t perform that action at this time.