]> git.wh0rd.org - tt-rss.git/commitdiff
focus query field in search dialog automatically
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 3 Feb 2010 09:35:27 +0000 (12:35 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 3 Feb 2010 09:35:27 +0000 (12:35 +0300)
tt-rss.js

index 911e3b1e5d393a08c934df8adde40247a981c323..05fefea3a530b58426d35ad875916d61ec06165c 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -541,7 +541,10 @@ function quickMenuGo(opid) {
                }
        
                if (opid == "qmcSearch") {
-                       displayDlg("search", getActiveFeedId() + ":" + activeFeedIsCat());
+                       displayDlg("search", getActiveFeedId() + ":" + activeFeedIsCat(), 
+                               function() { 
+                                       document.forms['search_form'].query.focus();
+                               });
                        return;
                }
        
@@ -1098,7 +1101,10 @@ function hotkey_handler(e) {
                        }
 
                        if (keycode == 191 || keychar == '/') { // /
-                               displayDlg("search", getActiveFeedId() + ":" + activeFeedIsCat());
+                               displayDlg("search", getActiveFeedId() + ":" + activeFeedIsCat(), 
+                                       function() { 
+                                               document.forms['search_form'].query.focus();
+                                       });
                                return false;
                        }