#1143 new

getHeight() wrong for hidden element when parent has < 100% width

Reported by Nick | September 20th, 2010 @ 01:47 PM

If you try to get the dimensions of a hidden element that's inside an element with less than 100% width, the dimensions reported are as if the parent was 100% width, so width is larger and height is less than when the element is visible.

This has an effect on Scriptaculous slide effects, as the transition doesn't slide out far enough. An example on the Scriptaculous wiki is the slide toggle effect:

If you reduce the width of the browser window so it's as wide as the sliding box, then it works properly.

Tested in Chrome 5.0.375.55, Firefox 3.6.9pre and Opera 10.
Test HTML attached.

No comments found

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

People watching this ticket