Close action menu when pressing escape

This commit is contained in:
Phoenix Eliot
2022-08-04 10:59:50 -04:00
committed by Tienson Qin
parent d39ae199fb
commit bc00dba369
2 changed files with 8 additions and 2 deletions

View File

@@ -2874,7 +2874,7 @@
(when (and (not editor-action) (not non-enter-processed?))
(cond
;; When you type text inside square brackets
(and (not (contains? #{"ArrowDown" "ArrowLeft" "ArrowRight" "ArrowUp"} k))
(and (not (contains? #{"ArrowDown" "ArrowLeft" "ArrowRight" "ArrowUp" "Escape"} k))
(wrapped-by? input page-ref/left-brackets page-ref/right-brackets))
(let [orig-pos (cursor/get-caret-pos input)
value (gobj/get input "value")