View Full Version : [OPEN] [UNKNOWN][3.0.0] Spotlight resize bug

14 Sep 2009, 2:39 PM
While the spotlight is shown, when the browser window is re-sized to less than its original width/height or if the spotlight is targeted to an element within an Ext.Window and the Ext.Window is maximized and then restored, you will see the browser have scrollbars since the spotlight's size is not sync'ed correctly on either of these re-size events.

I didn't bother with looking into the "real" fix for it and needed a quick fix, so I do this, with the added lines in red:

Ext.override(Ext.Spotlight, {
syncSize : function(){
this.applyBounds(true, false);
this.applyBounds(false, false);
show : function(el, callback, scope){
this.show.defer(50, this, [el, callback, scope]);
this.el = Ext.get(el);
this.applyBounds(true, false);
this.active = true;
Ext.EventManager.onWindowResize(this.syncSize, this);
this.applyBounds(false, this.animate, false, callback, scope);
this.applyBounds(true, false);
this.applyBounds(false, false, false, callback, scope); // all these booleans look hideous

Hopefully this helps lead to someone actually fixing the issue with a "real" fix. Oh, and I only saw/tested this in FF3.5.3. Never checked IE, Chrome, Safari, etc.

15 Sep 2009, 7:21 AM
Please post a test case that demonstrates the issue.

16 Sep 2009, 8:10 PM
Just go to the spotlight example: http://www.extjs.com/deploy/dev/examples/core/spotlight.html

1) Start with the browser at some dimension (even maximized).
2) Start a spotlight.
3) Either resize the browser smaller than it is or increase its size and then decrease its size. Any decreasing of its size will show the scrollbars.

And sorry I forgot to put the exact version: ExtJS 3.0.0 in my application and looking at the source code of the above link, it states "Ext JS Library 3.0+"

Let me know if you need more info.