This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

clickOutside兼容辣鸡火狐

old
宇天 2019-08-29 09:32:14 +08:00
parent 00bf4f3d42
commit 4e8e2cdcb4
1 changed files with 6 additions and 3 deletions

View File

@ -98,9 +98,12 @@ export const clickOutside = function(dom, fn = noop) {
} }
} }
} else { } else {
var target = ev.originalTarget || ev.target var target = ev.explicitOriginalTarget || ev.target
console.log(target, typeof target, target.__proto__) if (
if (dom === target || dom.contains(target)) { dom === target ||
dom.contains(target) ||
(dom.root && dom.root.contains(target))
) {
return return
} }
} }