From 9eff55ba6ab18ee6e6d3238cc660ed2164427e68 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Tue, 16 Jul 2019 04:38:45 +0000 Subject: [PATCH] Change arrow key behavior in input fields. --- EditorInputBase.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/EditorInputBase.js b/EditorInputBase.js index b7dcf2c..0245195 100644 --- a/EditorInputBase.js +++ b/EditorInputBase.js @@ -72,13 +72,11 @@ class EditorInputBase extends EditorEntryBase { case 'Escape': case '`': + this.stopEdit(); e.preventDefault(); e.stopPropagation(); - this.stopEdit(); break; - case 'ArrowUp': - case 'ArrowDown': case 'PageUp': case 'PageDown': this.stopEdit(); @@ -94,6 +92,7 @@ class EditorInputBase extends EditorEntryBase { super.onKeyDown(e); switch (e.key) { + case 'ArrowRight': case 'Enter': this.startEdit(); e.stopPropagation();