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:13 +0000 (14:15 -0400)
commit4a86ff3c808d6e6845376fdceb3be98c7282bf89
tree667fa1797077030f6bcfb31f22a0a8e5cd63fd98
parent81f67c7a2af3e12610149b6a77a7c1a28f8e4b98
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