Revert "优化focus事件"

This reverts commit df424ec3ac.
This commit is contained in:
Harvey committed 2020-04-16 14:57:33 +08:00
1 parent df424ec3ac
commit ac4e5a9c94
1 file changed
+2 -5
+2 -5
View File
@@ -2,11 +2,8 @@ export default function clickInit(art, events) {
const { $player } = art.template;
events.proxy(document, ['click', 'contextmenu'], (event) => {
if (event.composedPath && event.composedPath().indexOf($player) > -1) {
if (!art.isFocus) {
art.isFocus = true;
art.emit('focus');
}
art.emit(event.type, event);
art.isFocus = true;
art.emit('focus');
} else if (art.isFocus) {
art.isFocus = false;
art.emit('blur');