Skip to content

Commit

Permalink
Link mouse 3 / 4 to history stack
Browse files Browse the repository at this point in the history
  • Loading branch information
djblue committed Sep 25, 2024
1 parent edda21f commit 961bd05
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/portal/ui/app.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,15 @@
(when-let [el (.-current ref)]
(state/dispatch! state assoc :scroll-element el)))
[s/div
{:style
{:on-mouse-up
(fn [e]
(let [button (.-button e)]
(cond
(= 3 button)
(commands/history-back state)
(= 4 button)
(commands/history-forward state))))
:style
{:height "100vh"
:display :flex
:flex-direction :column}}
Expand Down

0 comments on commit 961bd05

Please sign in to comment.