From d11701bd4223eaf18131904c43517b9bf91b35cf Mon Sep 17 00:00:00 2001 From: Matthias Kestenholz Date: Wed, 22 Jan 2025 18:48:10 +0100 Subject: [PATCH] Fix the shortcut --- workbench/static/workbench/workbench.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workbench/static/workbench/workbench.js b/workbench/static/workbench/workbench.js index d51e1c05..10e96a51 100644 --- a/workbench/static/workbench/workbench.js +++ b/workbench/static/workbench/workbench.js @@ -284,7 +284,8 @@ $(() => { } else if (e.keyCode >= 48 && e.keyCode <= 57) { const el = _sel(`[data-number-shortcut="${(e.keyCode - 38) % 10}"]`) if (!el) return - if (el.dataset.ajaxmodal) { + e.preventDefault() + if ("ajaxmodal" in el.dataset) { window.openModalFromUrl(el.href) } else { window.location.href = el.href