From fc48ea9215474d136f66e31e4cb5811308be7552 Mon Sep 17 00:00:00 2001 From: Ben Shum Date: Mon, 13 Oct 2014 01:57:16 -0400 Subject: [PATCH] Move autofocus cursor in basic search to end of value After inserting the search terms for a basic search and initiating the search, the page focuses the cursor on the search box but usually puts the cursor at the beginning of the value (to the left of text) instead of at the end of the search terms (to the right of text). This forces users to delete from the left instead of using the backspace to delete from the right. Setting an onfocus puts the cursor where one might expect it. Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/parts/searchbar.tt2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2 index 5eb3873f6d..b1087587d0 100644 --- a/Open-ILS/src/templates/opac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2 @@ -25,7 +25,7 @@ store_args='{"org_unit_getter": function() { return [% ctx.search_ou %]; }}' [%- END # opac_visible -%] [%- ELSE -%] - [% IF basic_search != "f" %] autofocus [% END %] x-webkit-speech + [% IF basic_search != "f" %] autofocus onfocus="var temp_value=this.value;this.value='';this.value=temp_value" [% END %] x-webkit-speech [%- END # autosuggest enabled %] /> -- 2.11.0