mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
1 parent
df424ec3ac
commit
ac4e5a9c94
1 file changed
+2
-5
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user