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

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">
<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.fly('test').alignTo(document.body, 'b-b?');
<div id="test">Test text</div>
I've tested in FF 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

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

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.

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