#1137 bug

Element.relativize does not work properly

Reported by Mike | September 9th, 2010 @ 06:37 PM | in 1.8

The documentation says that Element.relativize is "used to undo a call to Element.absolutize." However, if you call Element.absolutize on an element and then call Element.relativize, the position of the element is still 'absolute' while the top and left values are reset to their original values.

There are two versions of these methods, one version in dom.js and the other in layout.js. This is unnecessary and confusing, especially since the one from dom.js works but is overridden by the broken one in layout.js.

To fix the problem, the the original position style needs to be added to the originalStyles object when calling absolutize.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

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.

Shared Ticket Bins