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

Request new functionality here
User avatar
firewyre
Bear Rating Trainee
Bear Rating Trainee
Posts: 19
Joined: 17 Apr 2013, 01:05
Location: Boston, MA
Contact:

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

Postby firewyre » 23 Jan 2014, 08:15

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.

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

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

Postby fox » 23 Jan 2014, 08:56

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.

User avatar
firewyre
Bear Rating Trainee
Bear Rating Trainee
Posts: 19
Joined: 17 Apr 2013, 01:05
Location: Boston, MA
Contact:

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

Postby firewyre » 23 Jan 2014, 09:18

Bummer (gotta love frameworks), but I totally understand the need to keep things consistent. Thanks Fox.

vidar
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 06 May 2013, 00:19

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

Postby vidar » 13 Oct 2014, 00:08

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.


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 4 guests