AutoSuggest: don't force-scroll browser; that's irritating
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 13 Mar 2012 15:21:59 +0000 (11:21 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 20 Mar 2012 20:05:37 +0000 (16:05 -0400)
By default, Dijits and things that inherit from Dijits (at least in
Dojo 1.3.3 that we're still using), have a true value for an attribute
called scrollOnFocus.  This makes your browser jump to ensure that the
widget that just received focus is in view.

You don't always want this though.  Try expanding the extras on the
record detail page of the TPAC without this commit, but with AutoSuggest
enabled, for example.

This commit sets the scrollOnFocus attribute to false for the
AutoSuggest widget.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/web/js/dojo/openils/widget/AutoSuggest.js

index e145c2d..8192751 100644 (file)
@@ -52,6 +52,7 @@ if (!dojo._hasResource["openils.widget.AutoSuggest"]) {
     dojo.declare(
         "openils.widget.AutoSuggest", [dijit.form.ComboBox], {
 
+            "scrollOnFocus": false,
             "labelAttr": "match",
             "labelType": "html",
             "searchAttr": "term",