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:52 UTC

[whimsy] branch WHIMSY-334 created (now 56cb08b)

This is an automated email from the ASF dual-hosted git repository.

rubys pushed a change to branch WHIMSY-334
in repository https://gitbox.apache.org/repos/asf/whimsy.git.


      at 56cb08b  don't process keystrokes if focus is in an INPUT or TEXTAREA

This branch includes the following new commits:

     new 56cb08b  don't process keystrokes if focus is in an INPUT or TEXTAREA

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[whimsy] 01/01: don't process keystrokes if focus is in an INPUT or TEXTAREA

Posted by ru...@apache.org.
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