-
1 Apr 2012 11:15 PM #1
[FIXED][4.1 RC1] layouts problems in chrome18 (fixed in RC3)
[FIXED][4.1 RC1] layouts problems in chrome18 (fixed in RC3)
OPEN
Ext version tested:- 4.1 B3
- 4.1 RC1
- Chrome 18
extjs/examples/layout/accordion.html
After some clicks on accordion items or resize west region, the panel is broken. See a picture.
P.S. CLEAN browser cache first.
extjs_panel_bug.jpg
P.S2: After chrome 18 update my components like accordion, tabpanel (inside Ext.panel.Panel), fill blue after clicks on items or add/remove some tabs.
static/extjs/examples/layout/border.html
extjs_panel_bug2.jpg
Last edited by Diavololt; 12 Apr 2012 at 3:40 AM. Reason: FIXED
-
2 Apr 2012 12:22 AM #2Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,034
- Vote Rating
- 27
Fix in post no. 22 by rhapsodyv http://www.sencha.com/forum/showthre...me-18-19/page3 seems to have a little effect but does not fix all issues.
Code:Ext.override(Ext.layout.ContextItem, { setHeight: function (height, dirty ) { var me = this, comp = me.target, frameBody, frameInfo, padding; if(isNaN(height)){ return; } if (height < 0) { height = 0; } if (!me.wrapsComponent) { if (!me.setProp('height', height, dirty)) { return NaN; } } else { height = Ext.Number.constrain(height, comp.minHeight || 0, comp.maxHeight); if (!me.setProp('height', height, dirty)) { return NaN; } frameBody = me.frameBodyContext; if (frameBody){ frameInfo = me.getFrameInfo(); frameBody.setHeight(height - frameInfo.height, dirty); } } return height; }, setWidth: function (width, dirty ) { var me = this, comp = me.target, frameBody, frameInfo, padding; if(isNaN(width)){ return; } if (width < 0) { width = 0; } if (!me.wrapsComponent) { if (!me.setProp('width', width, dirty)) { return NaN; } } else { width = Ext.Number.constrain(width, comp.minWidth || 0, comp.maxWidth); if (!me.setProp('width', width, dirty)) { return NaN; } frameBody = me.frameBodyContext; if (frameBody) { frameInfo = me.getFrameInfo(); frameBody.setWidth(width - frameInfo.width, dirty); } } return width; } });
-
2 Apr 2012 1:19 AM #3
Thanks for quick reply and solution. It seems, with this override, now working fine.
-
3 Apr 2012 5:46 PM #4
So, I think I've tracked it down to a V8 bug which I've reported here: http://code.google.com/p/v8/issues/detail?id=2056
We can work around this - I'll have an update in Ext.Number.constrain soon.
I didn't want to just put those patches in without finding out what was happening.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
4 Apr 2012 10:56 AM #5
Crazy!! Math.max(NaN, 0) === 0 in Chrome!! :-p
-
5 Apr 2012 4:01 AM #6
In my ext-fixes.js:
Code:/* * Chrome 18+ Math.max/min(NaN, 0) === 0 BUG * * http://www.sencha.com/forum/showthread.php?192517-OPEN-4.1-RC1-layouts-problems-in-chrome18&p=771679&viewfull=1#post771679 */ Ext.Number.constrain = function(number, min, max) { number = parseFloat(number); if (isNaN(number)) { return NaN; } if (!isNaN(min)) { number = Math.max(number, min); } if (!isNaN(max)) { number = Math.min(number, max); } return number; };
-
10 Apr 2012 3:34 AM #7
-
10 Apr 2012 10:57 PM #8
Strange fix but it fixes all my troubles about layout resizing on toolbar and panel's body in chrome 18 too with 4.1RC2.

Thanks !
-
12 Apr 2012 3:39 AM #9
In 4.1.0 RC3 this problem has been fixed. Thanks!
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote
