source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Set the "autofocus" attribute on the query text box.
@ 2016-04-28 17:59 schwarze
  2016-04-29  0:48 ` Anthony J. Bentley
  0 siblings, 1 reply; 2+ messages in thread
From: schwarze @ 2016-04-28 17:59 UTC (permalink / raw)
  To: source

Log Message:
-----------
Set the "autofocus" attribute on the query text box.
Patch from Fabian dot Raetz at gmail dot com.

Modified Files:
--------------
    mdocml:
        cgi.c

Revision Data
-------------
Index: cgi.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/cgi.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -Lcgi.c -Lcgi.c -u -p -r1.129 -r1.130
--- cgi.c
+++ cgi.c
@@ -384,7 +384,7 @@ resp_searchform(const struct req *req)
 		"<input type=\"text\" name=\"query\" value=\"");
 	if (NULL != req->q.query)
 		html_print(req->q.query);
-	puts("\" size=\"40\">");
+	puts("\" size=\"40\" autofocus>");
 
 	/* Write submission and reset buttons. */
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mdocml: Set the "autofocus" attribute on the query text box.
  2016-04-28 17:59 mdocml: Set the "autofocus" attribute on the query text box schwarze
@ 2016-04-29  0:48 ` Anthony J. Bentley
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony J. Bentley @ 2016-04-29  0:48 UTC (permalink / raw)
  To: source; +Cc: schwarze

schwarze@mdocml.bsd.lv writes:
> Log Message:
> -----------
> Set the "autofocus" attribute on the query text box.
> Patch from Fabian dot Raetz at gmail dot com.

After completing a search, or when I follow a link to the page from
somewhere else, the first thing I generally do is try to page down with
the space bar or use Ctrl+F. And neither of those work if the text box
is selected. So I have to click the mouse; can't even hit tab, because
of all the form elements nearby.

I'll grant that this makes sense for the root page. But for other
pages I think it's less usable.

-- 
Anthony J. Bentley
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-29  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-28 17:59 mdocml: Set the "autofocus" attribute on the query text box schwarze
2016-04-29  0:48 ` Anthony J. Bentley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).