Fix modifier-key click guard in orchestration verb handler
The set!-based approach (nested when + mutate + re-check) didn't work because CEK evaluates the outer when condition once. Replace with a single (when (and should-fire (not modifier-click?)) ...) guard. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -415,12 +415,9 @@
|
||||
(set! should-fire false)
|
||||
(set! last-val val))))
|
||||
|
||||
(when should-fire
|
||||
;; Let browser handle modifier-key clicks (ctrl-click → new tab)
|
||||
(when (and (= event-name "click") (event-modifier-key? e))
|
||||
(set! should-fire false))
|
||||
|
||||
(when should-fire
|
||||
;; Let browser handle modifier-key clicks (ctrl-click → new tab)
|
||||
(when (and should-fire
|
||||
(not (and (= event-name "click") (event-modifier-key? e))))
|
||||
;; Prevent default for submit/click on links
|
||||
(when (or (= event-name "submit")
|
||||
(and (= event-name "click")
|
||||
@@ -453,7 +450,7 @@
|
||||
(set-timeout
|
||||
(fn () (execute-request el nil nil))
|
||||
(get mods "delay"))))
|
||||
(execute-request el nil nil)))))))))
|
||||
(execute-request el nil nil))))))))
|
||||
(if (get mods "once") (dict "once" true) nil))))))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user