Skip to content

Commit

Permalink
Merge pull request #529 from Neriderc/fix-context-menu
Browse files Browse the repository at this point in the history
Fix context menu
  • Loading branch information
Neriderc authored Nov 16, 2024
2 parents 67efe0f + 59be4de commit 3466b47
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions resources/javascript/gvexport.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,16 +329,14 @@ function pageLoaded(Url) {
});

document.addEventListener("mousedown", function(event) {

// Hide diagram context menu if clicked off a tile
if (event.target.closest('.settings_ellipsis_menu_item') == null && event.target.parent && event.target.parent.id !== 'menu-info') {
if (event.target.closest('.settings_ellipsis_menu_item') == null && event.target.parent?.id !== 'menu-info') {
UI.contextMenu.clearContextMenu();
}
});

document.addEventListener("click", function(event) {
removeSettingsEllipsisMenu(event.target);

if (!document.getElementById('searchButton').contains(event.target) && !document.getElementById('diagram_search_box_container').contains(event.target)) {
Form.showHideSearchBox(event, false);
}
Expand Down

0 comments on commit 3466b47

Please sign in to comment.