fix event.composedPath

This commit is contained in:
zhw2590582 committed 2020-02-29 22:18:11 +08:00
1 parent 25b041ad8c
commit c7a351bc55
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
export default function clickInit(art, events) {
const { $player } = art.template;
events.proxy(document, ['click', 'contextmenu'], event => {
if (event.composedPath().indexOf($player) > -1) {
if (event.composedPath && event.composedPath().indexOf($player) > -1) {
art.isFocus = true;
art.emit('focus');
} else {