PDA

View Full Version : [FIXED-1069][ExtJS 3.3.0] Problem with getMargins method under Chrome



vladsch
24 Jun 2010, 7:04 AM
Hi,

ExtJS version - 3.3.0
Browser - Chrome 5.0

If call getMargins('lr') for Panel's element (the panel has 'margin:20px;') then we get 20 instead 40. It is occurs under Chrome 5.0 only (another browsers (IE, FF) works fine)

Here is test case:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<%--Place here ExtJS resource files--%>
<script type="text/javascript">
Ext.onReady(function () {
var panel = new Ext.Panel({
renderTo: "Panel1_Container",
style: "margin: 20px;",
height: 200,
width: 200,
title: "Panel",
buttons: [{
xtype: "button",
text: "Show margins",
listeners: {
click: {
fn: function (el, e) {
Ext.Msg.alert('Margins', 'TB: ' + panel.getEl().getMargins('tb') + '<br/>LR:' + panel.getEl().getMargins('lr'))
}
}
}
}]
});
});
</script>
</head>
<body>
<div id="Panel1_Container">
</div>
</body>
</html>

Jamie Avins
24 Jun 2010, 8:37 AM
Thanks for the test case, we'll try it out.

Jamie Avins
24 Jun 2010, 9:20 AM
Well they finally fixed the bug in WebKit (only took a few years). We'll put in a bug detect for 3.3.x and only apply it when the bug is present.

evant
27 Jun 2010, 6:00 PM
This has been corrected in SVN, thanks for the report.