From f6668aef37fda13ed957b19fbb2efe9778bdc9ff Mon Sep 17 00:00:00 2001 From: scheinriese Date: Wed, 11 Mar 2026 12:12:53 +0100 Subject: [PATCH] Fix row highlight for keymap shortcut press animation highlight-row! was looking for .shui-shortcut-row but keymap rows use .shortcut-row, so the row highlight silently failed. Widen the selector and add a visible background style for keymap rows. Co-Authored-By: Claude Opus 4.6 --- deps/shui/src/logseq/shui/shortcut.cljs | 4 ++-- src/main/frontend/components/shortcut.css | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/deps/shui/src/logseq/shui/shortcut.cljs b/deps/shui/src/logseq/shui/shortcut.cljs index 0e40ab5791..4a52a2ade7 100644 --- a/deps/shui/src/logseq/shui/shortcut.cljs +++ b/deps/shui/src/logseq/shui/shortcut.cljs @@ -159,9 +159,9 @@ (def ^:private press-animation-ms 160) (defn- highlight-row! - "Add or remove the row highlight class on the closest .shui-shortcut-row ancestor." + "Add or remove the row highlight class on the closest shortcut row ancestor." [^js container add?] - (when-let [^js row (or (.closest container ".shui-shortcut-row") + (when-let [^js row (or (.closest container ".shui-shortcut-row, .shortcut-row") (.-parentElement container))] (if add? (.add (.-classList row) "shui-shortcut-row--pressed") diff --git a/src/main/frontend/components/shortcut.css b/src/main/frontend/components/shortcut.css index 9628d7ebab..04c6833787 100644 --- a/src/main/frontend/components/shortcut.css +++ b/src/main/frontend/components/shortcut.css @@ -214,6 +214,11 @@ button.shortcut-feedback-action { &.active { background-color: var(--lx-gray-05-alpha, var(--rx-gray-05-alpha)); } + + /* Shortcut keypress highlight — briefly flashes the row when the user presses a shortcut */ + &.shui-shortcut-row--pressed { + background-color: var(--lx-gray-05-alpha, var(--rx-gray-05-alpha)); + } } &.th {