From 85bd5619fa282864f9135a2d98821ce119edbfa9 Mon Sep 17 00:00:00 2001 From: Roland Date: Sat, 4 Jul 2026 12:23:23 -0600 Subject: [PATCH] Open in Slicer: launch slicer programmatically from dropdown items. Semantic UI may activate a Dropdown.Item from the keyboard without following its href, which would save the slicer preference without launching the slicer. Prevent the default anchor navigation and call window.location.assign() so every activation path behaves the same. Co-Authored-By: Claude Fable 5 --- app/src/components/FilePreview.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/components/FilePreview.js b/app/src/components/FilePreview.js index 2d2b7450..2edcaaab 100644 --- a/app/src/components/FilePreview.js +++ b/app/src/components/FilePreview.js @@ -72,7 +72,13 @@ function OpenInSlicerButton({previewFile}) { {SLICERS.map(s => setSlicerKey(s.key)}/>)} + onClick={(e) => { + // Navigate programmatically so keyboard activation (which may not + // follow the href) still launches the slicer. + if (e) e.preventDefault(); + setSlicerKey(s.key); + window.location.assign(getSlicerURL(previewFile, s.scheme)); + }}/>)}