Close context menu if open when clicking on group

This commit is contained in:
Cohee 2023-11-10 00:04:16 +02:00
parent 7385de8cf8
commit 3a5cd5d202
1 changed files with 7 additions and 2 deletions

View File

@ -485,7 +485,7 @@ class BulkEditOverlay {
BulkEditOverlay.longPressDelay);
}
handleLongPressEnd = () => {
handleLongPressEnd = (event) => {
this.isLongPress = false;
if (this.#contextMenuOpen) event.stopPropagation();
}
@ -506,7 +506,12 @@ class BulkEditOverlay {
event.clientY || event.touches[0].clientY,
];
#stopEventPropagation = (event) => event.stopPropagation();
#stopEventPropagation = (event) => {
if (this.#contextMenuOpen) {
this.handleContextMenuHide(event);
}
event.stopPropagation();
}
#enableClickEventsForGroups = () => this.#getDisabledElements().forEach((element) => element.removeEventListener('click', this.#stopEventPropagation));