From 93359218bb39ab2c78bbe5f97c22a3b430a03213 Mon Sep 17 00:00:00 2001 From: Nariman Jelveh Date: Fri, 23 Oct 2026 14:04:33 -0700 Subject: [PATCH] fix(dashboard): don't close Properties when a text selection ends on the backdrop Drag-selecting the path or UID in the properties dialog and releasing over the dimmed backdrop closed the dialog: the click lands on the overlay when press and release are on different elements. The backdrop now closes it only when the press started there, as the share dialog already does. --- src/gui/src/UI/Dashboard/UIItemPropertiesModal.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/src/UI/Dashboard/UIItemPropertiesModal.js b/src/gui/src/UI/Dashboard/UIItemPropertiesModal.js index ab0a603b8..e9f0ca88a 100644 --- a/src/gui/src/UI/Dashboard/UIItemPropertiesModal.js +++ b/src/gui/src/UI/Dashboard/UIItemPropertiesModal.js @@ -118,8 +118,14 @@ export default function UIItemPropertiesModal ({ name, path: item_path, uid, $co // -- Dismissal wiring -- $overlay.on('click', '.item-props-close', close); + // Backdrop close goes by where the press started: a text selection dragged + // out of the card registers its click on the overlay. + let backdrop_pressed = false; + $overlay.on('mousedown', function (e) { + backdrop_pressed = e.target === $overlay[0]; + }); $overlay.on('click', function (e) { - if ( e.target === $overlay[0] ) close(); + if ( e.target === $overlay[0] && backdrop_pressed ) close(); }); $(document).on(keydown_ns, function (e) { if ( e.key === 'Escape' && isOverlayOnTop($overlay[0]) ) close();