Skip to content

Commit

Permalink
fix usage of preventDefault method
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Oct 7, 2023
1 parent fe0f107 commit a3e4699
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
19 changes: 11 additions & 8 deletions calcit.cirru

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions compact.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@
if
not $ empty? coord
d! :writer/go-up nil
.preventDefault event
.!preventDefault event
(= code keycode/down)
do
d! :writer/go-down $ {} (:tail? shift?)
Expand Down Expand Up @@ -1199,7 +1199,7 @@
(and meta? (= code keycode/c) (= (.-selectionStart (.-target event)) (.-selectionEnd (.-target event))))
do-copy-logics! d! (tree->cirru leaf) "\"Copied!"
(and meta? shift? (= code keycode/v))
do (on-paste! d!) (.preventDefault event)
do (on-paste! d!) (.!preventDefault event)
(and meta? (= code keycode/d))
do (.!preventDefault event)
if
Expand Down Expand Up @@ -5422,7 +5422,8 @@
do (.!preventDefault event)
dispatch! $ :: :effect/save-files
(and meta? shift? (= code keycode/f))
dispatch! :router/change $ {} (:name :files)
dispatch! $ :: :router/change
{} $ :name :files
(and meta? (not shift?) (= code keycode/period))
dispatch! $ :: :writer/picker-mode
:ns $ %{} :CodeEntry (:doc |)
Expand Down

0 comments on commit a3e4699

Please sign in to comment.