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 <bshum@biblio.org>
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 %] />
</label>
</span>