From 35fc9a06198a6dcbc8849110163f6f0fd3e3a5e8 Mon Sep 17 00:00:00 2001 From: Edouard Vanbelle Date: Sat, 25 Apr 2026 00:12:02 +0200 Subject: [PATCH] improve(ui): share-dialog: click outside of dialog closes the window --- static/css/components/dialogs.css | 8 -------- static/js/app/ui.js | 6 ++++++ static/js/views/shared/sharedView.js | 12 ++++++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/static/css/components/dialogs.css b/static/css/components/dialogs.css index a6a5f771..8790a190 100644 --- a/static/css/components/dialogs.css +++ b/static/css/components/dialogs.css @@ -213,10 +213,6 @@ animation: modalFadeIn 0.2s ease; } -.shared-dialog.active { - display: flex; -} - .shared-dialog-content { background-color: var(--color-bg-surface); border-radius: 16px; @@ -599,10 +595,6 @@ z-index: 1000; } -.dialog.active { - display: flex; -} - .dialog-content { background-color: var(--color-bg-surface); border-radius: 10px; diff --git a/static/js/app/ui.js b/static/js/app/ui.js index 4c5f0d08..4deac6bb 100644 --- a/static/js/app/ui.js +++ b/static/js/app/ui.js @@ -260,6 +260,12 @@ const ui = { contextMenus.closeShareDialog(); } }); + + shareDialog.addEventListener('click', (e) => { + if (e.target === shareDialog) { + contextMenus.closeShareDialog(); + } + }); } // Notification dialog diff --git a/static/js/views/shared/sharedView.js b/static/js/views/shared/sharedView.js index 8c04b008..8e17de2c 100644 --- a/static/js/views/shared/sharedView.js +++ b/static/js/views/shared/sharedView.js @@ -157,7 +157,7 @@ const sharedView = { -
+