PDA

View Full Version : IE11 close and maximize buttons orientation



ssamuel68
30 Apr 2014, 1:03 PM
Hi,

Im having an issue with extjs 4.0.7 and IE11 and I can't upgrade to a newer version of extjs.

On my windows, the buttons "close" and "maximize" are align to the left insted of the right. This only happend in IE11, in the other browsers it looks great.

Any fix I can apply here?

Thx

Gary Schlosberg
1 May 2014, 5:26 AM
ExtJS 4.0.7 was released even before IE10, so unfortunately it isn't possible for IE11 to be supported. Short of upgrading (which you indicated isn't possible right now), I found this thread which might help:
http://www.sencha.com/forum/showthread.php?278740

Post 7 has a workaround, and post 10 links to a thread with another.

ssamuel68
2 May 2014, 5:43 AM
This did the trick for me. Found it in other post.



if (Object.hasOwnProperty.call(window, "ActiveXObject") && !window.ActiveXObject) { // is IE11
Ext.apply(Ext, {
isIE: false, // cosmetic, since it's false by default for IE11
isIE11: true,
ieVersion: 11
});
Ext.override(Ext.layout.container.Container, {
getLayoutTargetSize: function() {
var target = this.getTarget(),
ret;


if (target) {
ret = target.getViewSize();


// IE in will sometimes return a width of 0 on the 1st pass of getViewSize.
// Use getStyleSize to verify the 0 width, the adjustment pass will then work properly
// with getViewSize
if ((Ext.isIE || Ext.isIE11) && ret.width == 0) {
ret = target.getStyleSize();
}


ret.width -= target.getPadding('lr');
ret.height -= target.getPadding('tb');
}
return ret;
}
});
}