Page 1 of 1

Let the "Enter" key submit the form in the search pop

Posted: 23 Jan 2014, 08:15
by firewyre
I search a lot, and I could do so faster if I could hit the enter key to submit the search rather than having to mouse over to the search button. Minor thing, but it would be a huge help if you have a chance to get to it.

Re: Let the "Enter" key submit the form in the search pop

Posted: 23 Jan 2014, 08:56
by fox
Unfortunately last I poked at it every form needs to be modified in a special annoying way to make this work (thanks dojo) and I don't want to enable this just for search or some other form because of UI inconsistency. In any case, I'm aware of this issue.

Re: Let the "Enter" key submit the form in the search pop

Posted: 23 Jan 2014, 09:18
by firewyre
Bummer (gotta love frameworks), but I totally understand the need to keep things consistent. Thanks Fox.

Re: Let the "Enter" key submit the form in the search pop

Posted: 13 Oct 2014, 00:08
by vidar
I finally got around to installing Sphinx and now searching is so fast, it felt like I spent more time finding and clicking the Search key than waiting for search results. So I did the simplest hack I could think of:

Code: Select all

[email protected]:/usr/local/www/tt-rss/classes % diff -c3 feeds.php-backup feeds.php
*** feeds.php-backup   Sun Jul 20 08:52:37 2014
--- feeds.php   Sun Oct 12 21:45:30 2014
***************
*** 1109,1114 ****
--- 1109,1115 ----
        print "<div class=\"dlgSecCont\">";
 
        print "<input dojoType=\"dijit.form.ValidationTextBox\"
+          onkeyup=\"if (event.keyCode == 13) dijit.byId('searchDlg').execute()\"
           style=\"font-size : 16px; width : 20em;\"
           required=\"1\" name=\"query\" type=\"search\" value=''>";
 

This is near the beginning of function search() in classes/feeds.php of tt-rss v1.13.
Disclaimer: For all I know this may break stuff, but I have not seen any ill effects yet.