TPAC: Autosuggest focus() throws a JS error
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 18:15:34 +0000 (14:15 -0400)
commita575bb9675b33635a15a871cb5538794bf1e64cc
tree2ff794addd5ba9b89d418d2a5dce0e5953c869c7
parenta907bc50f586c99624c8781ba0bcf15383d5c38a
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