mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-11 15:47:06 +08:00
fix: 应该使用捕获,而非冒泡
This commit is contained in:
parent
d39da0f602
commit
d4a2c38484
@ -42,9 +42,9 @@ export class AudioPlayer extends EventEmitter<AudioPlayerEvent> {
|
||||
document.body.removeEventListener('touchstart', func);
|
||||
document.body.removeEventListener('keydown', func);
|
||||
};
|
||||
document.body.addEventListener('mousedown', func);
|
||||
document.body.addEventListener('touchstart', func);
|
||||
document.body.addEventListener('keydown', func);
|
||||
document.body.addEventListener('mousedown', func, { capture: true });
|
||||
document.body.addEventListener('touchstart', func, { capture: true });
|
||||
document.body.addEventListener('keydown', func, { capture: true });
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user