Undefined in Element.relativize (IE7.0)
Reported by qrizly | September 4th, 2008 @ 06:51 AM
function Element.relativize was crashing in IE 7.0 and the problem was in the following code:
element.style.height = element._originalHeight;
element.style.width = element._originalWidth;
its fixed when changed to:
element.style.height = element._originalHeight || 0;
element.style.width = element._originalWidth || 0;
Comments and changes to this ticket
-
John-David Dalton September 5th, 2008 @ 04:31 PM
- → State changed from new to invalid
you must call absolutize first.
-
Nick Stakenburg September 5th, 2008 @ 05:09 PM
This ticket is related http://prototype.lighthouseapp.c...
Christophe suggested to add Element#makeAbsolute and undoAbsolute, for a more consistent API. I think that's a great idea. Since right now the usage relativize being an undo mechanism isn't clear. Element#relativize/absolutize could be deprecated.
-

Diodeus October 27th, 2008 @ 09:33 PM
I find this fix to work effectively. The "|| 0" fix made my element disappear.
element.style.height = element._originalHeight || Element.getHeight(element); element.style.width = element._originalWidth || Element.getWidth(element);
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
