Skip to content

Commit

Permalink
Merge pull request #242 from tho-masn/fix_active_element
Browse files Browse the repository at this point in the history
IE11 fix: Added check for activeElement
  • Loading branch information
ndelvalle authored Sep 17, 2020
2 parents ed5c5e6 + f9fa3a0 commit fa6e3c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/v-click-outside.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ function onFauxIframeClick({ el, event, handler, middleware }) {
// https://stackoverflow.com/q/2381336#comment61192398_23231136
setTimeout(() => {
const { activeElement } = document
if (activeElement.tagName === 'IFRAME' && !el.contains(activeElement)) {
if (
activeElement &&
activeElement.tagName === 'IFRAME' &&
!el.contains(activeElement)
) {
execHandler({ event, handler, middleware })
}
}, 0)
Expand Down

0 comments on commit fa6e3c8

Please sign in to comment.