mirror of
https://github.com/logseq/logseq.git
synced 2026-05-19 10:22:37 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
4
deps/shui/src/logseq/shui/shortcut.cljs
vendored
4
deps/shui/src/logseq/shui/shortcut.cljs
vendored
@@ -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")
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user