feat: revert contextmenuHandler

This commit is contained in:
DIYgod 2022-08-15 21:00:57 +01:00
parent 455af3385f
commit ad4a1a78be
No known key found for this signature in database
GPG Key ID: D159328F47A80DCA
1 changed files with 3 additions and 3 deletions

View File

@ -13,14 +13,14 @@ class ContextMenu {
});
this.contextmenuHandler = (e) => {
const event = e || window.event;
event.preventDefault();
if (this.shown) {
this.hide();
return;
}
const event = e || window.event;
event.preventDefault();
const clientRect = this.player.container.getBoundingClientRect();
this.show(event.clientX - clientRect.left, event.clientY - clientRect.top);