ignore hotkeys inside textarea on preferences screen

Development-related discussion, including bundled plugins
User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

ignore hotkeys inside textarea on preferences screen

Postby gmargo » 11 Mar 2012, 04:54

I was editing my CSS preferences, and within a comment I tried to type a question mark, but this brought up a help overlay instead.

So here's a minor patch to js/prefs.js, to ignore hot keys within a TEXTAREA, such as the CSS editor dialog, just like in js/tt-rss.js.

Code: Select all

diff --git a/js/prefs.js b/js/prefs.js
index 4342f61..e9ae891 100644
--- a/js/prefs.js
+++ b/js/prefs.js
@@ -970,7 +970,7 @@ function validatePrefsReset() {
 
 function pref_hotkey_handler(e) {
    try {
-      if (e.target.nodeName == "INPUT") return;
+      if (e.target.nodeName == "INPUT" || e.target.nodeName == "TEXTAREA") return;
 
       var keycode = false;
       var shift_key = false;

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: ignore hotkeys inside textarea on preferences screen

Postby fox » 11 Mar 2012, 08:54

Thanks, fixed in trunk.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 3 guests