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>
Mon, 30 Jul 2012 15:30:50 +0000 (11:30 -0400)
commit1546c5de98df3e79055ab4bd50b31058d79b1bbe
tree6dfcc12bc4004cee825370c413112fff79c025ed
parentdf16ba71822e48b7661b1057d523b15deb20f7c8
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