Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 2436838

Browse files
committed
Hide the content menu on mouse up
1 parent 4f42be3 commit 2436838

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/client/src/menus/context_menu.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ class ContextMenu {
192192
// it's important to stop the propagation especially for sub-menus, otherwise the event
193193
// might be handled again by top-level menu
194194
return false;
195+
})
196+
.on("mouseup", (e) =>{
197+
e.stopPropagation();
198+
// Hide the content menu on mouse up to prevent the mouse event from propagating to the elements below.
199+
this.hide();
200+
return false;
195201
});
196202

197203
if ("enabled" in item && item.enabled !== undefined && !item.enabled) {

0 commit comments

Comments
 (0)