You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2020/07/14 14:06:53 UTC
[whimsy] 01/01: don't process keystrokes if focus is in an INPUT or
TEXTAREA
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch WHIMSY-334
in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit 56cb08b47a4d4672e77999c7ccf034731c7d0f1c
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Tue Jul 14 10:06:18 2020 -0400
don't process keystrokes if focus is in an INPUT or TEXTAREA
---
www/secretary/workbench/views/parts.js.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/www/secretary/workbench/views/parts.js.rb b/www/secretary/workbench/views/parts.js.rb
index 99d30f1..1652c18 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -519,6 +519,8 @@ class Parts < Vue
# handle keyboard events
def keydown(event)
+ return if %w(INPUT TEXTAREA).includes? document.activeElement.nodeName
+
if event.keyCode == 8 or event.keyCode == 46 # backspace or delete
if event.metaKey or event.ctrlKey
@busy = true