Browse Source

fix(modal): prevent default behavior while pressing Enter

situ2001 1 year ago
parent
commit
2055a083fd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/ui.cljs

+ 2 - 1
src/main/frontend/ui.cljs

@@ -635,7 +635,8 @@
      (mixins/on-key-down
       state
       {;; enter
-       13 (fn [state _e]
+       13 (fn [state e]
+            (.preventDefault e)
             (some->
              (.querySelector (rum/dom-node state) "button.ui__modal-enter")
              (.click)))})))