TPAC: Autosuggest focus() throws a JS error user/dbs/fix_autosuggest_focus
authorDan Scott <dscott@laurentian.ca>
Mon, 30 Jul 2012 15:30:50 +0000 (11:30 -0400)
committerDan Scott <dscott@laurentian.ca>
Fri, 17 Aug 2012 17:43:21 +0000 (13:43 -0400)
commit8451f4b4573120d3d55cda3ec043d6bf80ffce8b
tree8b83416ab63d70951c4a484c92e4034b433f8583
parent787fc31935b60c5e35509f7a395be1e9815979f8
TPAC: Autosuggest focus() throws a JS error

On page load, the Dojo autosuggest code tries to set focus to the
element with the ID "search_box" - which is fine, except when the page
does not have said ID. Therefore, test for the existence of the ID
before setting focus to it.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/js.tt2