Skip to content

Commit fa6e3c8

Browse files
authored
Merge pull request #242 from tho-masn/fix_active_element
IE11 fix: Added check for activeElement
2 parents ed5c5e6 + f9fa3a0 commit fa6e3c8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/v-click-outside.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ function onFauxIframeClick({ el, event, handler, middleware }) {
3636
// https://stackoverflow.com/q/2381336#comment61192398_23231136
3737
setTimeout(() => {
3838
const { activeElement } = document
39-
if (activeElement.tagName === 'IFRAME' && !el.contains(activeElement)) {
39+
if (
40+
activeElement &&
41+
activeElement.tagName === 'IFRAME' &&
42+
!el.contains(activeElement)
43+
) {
4044
execHandler({ event, handler, middleware })
4145
}
4246
}, 0)

0 commit comments

Comments
 (0)