PDA

View Full Version : Bug in alignTo if element is document body



dotnetCarpenter
12 Jun 2007, 10:31 PM
Hi all!

I just took the new beta 1 for a test spin and found a bug in the alignTo method of Element.
To be exact the exception is thrown in the getAlignToXY method.
To reproduce the error you can use this (it's not possible to upload htm files):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>alignTo Bug</title>
<script type="text/javascript" src="../scripts/ext-base.js"></script>
<script type="text/javascript" src="../scripts/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
Ext.fly('test').alignTo(document.body, 'b-b?');
});
</script>
</head>
<body>
<div id="test">Test text</div>
</body>
</html>
I've tested in FF 2.0.0.3 on a WinXP Pro box.
It's worth noticing that the above will work in the classic YUI EXT combination in EXT 1.0.1

dotnetCarpenter
13 Jun 2007, 7:33 AM
Can anyone confirm this?

jack.slocum
13 Jun 2007, 9:20 AM
? is not valid when aligning to the body (or document). The docs will be updated to point this out.

dotnetCarpenter
14 Jun 2007, 1:11 PM
ok - that makes sense.