hmiatn
1 Oct 2007, 6:49 PM
[ext-build]: 2.0 [should put this in the title, but can not modify the title after I post it.]
[os]: windows vista
[browser]: firefox 2.0.0.7
Tried to implement a splitbar to resize the height of a td. The height of the td is not resizing to the drop location of the splitbar in firefox. Here is a page that demonstrates the problem.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Height of TD</title>
<link rel="stylesheet" type="text/css" href="./resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="./resources/css/xtheme-default.css" /><!-- LIBS -->
<script type="text/javascript" src="./adapter/ext/ext-base.js"></script>
<!-- ENDLIBS -->
<script type="text/javascript" src="./ext-all.js"></script>
</head>
<body>
<table>
<tr>
<td id="testtd" style="background-color:red; padding:20px; border:2px solid green">
inside td
</td>
</tr>
<tr>
<td id="splitter" style="background-color:green; height:5px; border:2px solid green">
<td>
</tr>
</table>
<script type="text/javascript" >
var splitter = new Ext.SplitBar("splitter", "testtd",
Ext.SplitBar.VERTICAL, Ext.SplitBar.TOP);
</script>
</body>
</html>
I did some debugging, still not sure where the problem is. It seems to do with getHeight and setHeight of the td element. SplitBar does a getHeight for the td element before resizing and then does a setHeight for the td after resizing is done. However, getHeight returns a height not including padding and border, while setHeight will deduct padding and border from the height. That causes the discrpency of the drag drop location and td height. Not sure what is causing getHeight/setHeight behavior asymmetrically though.
[os]: windows vista
[browser]: firefox 2.0.0.7
Tried to implement a splitbar to resize the height of a td. The height of the td is not resizing to the drop location of the splitbar in firefox. Here is a page that demonstrates the problem.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Height of TD</title>
<link rel="stylesheet" type="text/css" href="./resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="./resources/css/xtheme-default.css" /><!-- LIBS -->
<script type="text/javascript" src="./adapter/ext/ext-base.js"></script>
<!-- ENDLIBS -->
<script type="text/javascript" src="./ext-all.js"></script>
</head>
<body>
<table>
<tr>
<td id="testtd" style="background-color:red; padding:20px; border:2px solid green">
inside td
</td>
</tr>
<tr>
<td id="splitter" style="background-color:green; height:5px; border:2px solid green">
<td>
</tr>
</table>
<script type="text/javascript" >
var splitter = new Ext.SplitBar("splitter", "testtd",
Ext.SplitBar.VERTICAL, Ext.SplitBar.TOP);
</script>
</body>
</html>
I did some debugging, still not sure where the problem is. It seems to do with getHeight and setHeight of the td element. SplitBar does a getHeight for the td element before resizing and then does a setHeight for the td after resizing is done. However, getHeight returns a height not including padding and border, while setHeight will deduct padding and border from the height. That causes the discrpency of the drag drop location and td height. Not sure what is causing getHeight/setHeight behavior asymmetrically though.