From ba4e46321ca727ee86df1f167e01a5df6373931a Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Fri, 28 Sep 2012 15:26:06 -0400 Subject: [PATCH] Make scrollOnFocus default to false for dojo-based/conify interfaces This change is intended to prevent a phenomenon in certain user interfaces wherein clicking on a button or other widget can cause a user's screen to suddenly jump and the user to need to click the widget a second time before the desired function actually happens. Dijits that have the scrollOnFocus property are the ones that tend to exhibit this issue, especially, but not always, within the staff client when the user's xulrunner window is not maximized. There may be cases of interfaces actually relying on scrollOnFocus to do something, but I think those cases should be so rare that this is still worth doing, and exceptions can be applied there as needed. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Ben Shum --- Open-ILS/web/js/ui/base.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/base.js b/Open-ILS/web/js/ui/base.js index 4f5c3e7605..c92c7e1d7d 100644 --- a/Open-ILS/web/js/ui/base.js +++ b/Open-ILS/web/js/ui/base.js @@ -1,3 +1,9 @@ +dojo.require('dijit.form._FormWidget'); + +/* scrollOnFocus is usually terrible, and causes lots of buttons and the like + * to require a second click. */ +dijit.form._FormWidget.prototype.scrollOnFocus = false; + dojo.require('dijit.Dialog'); dojo.require('dojo.cookie'); dojo.require('fieldmapper.AutoIDL'); // make conditional. TT variable sets JS var to enable/disable? @@ -6,7 +12,6 @@ dojo.require('openils.CGI'); dojo.require('openils.Event'); dojo.require('openils.Util'); dojo.require('openils.XUL'); - var cgi = new openils.CGI(); function oilsSetupUser() { -- 2.11.0