TPAC: Autosuggest focus() throws a JS error user/artunit/fix_autosuggest_focus-signoff
authorDan Scott <dscott@laurentian.ca>
Mon, 30 Jul 2012 15:30:50 +0000 (11:30 -0400)
committerArt Rhyno <art632000@yahoo.ca>
Fri, 17 Aug 2012 17:55:42 +0000 (13:55 -0400)
commit39f51ce50b5b576ed09b10c5fb300e8008b5b7f2
treec318be95c0acc0697876394f0eb85a94fcba490b
parent9f0536984bf32c71b3a42aa3274093757ed1296a
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>
Signed-off-by: Art Rhyno <art632000@yahoo.ca>
Open-ILS/src/templates/opac/parts/js.tt2