hlship / tapx

Extensions to Tapestry 5
http://tapestry.formos.com/projects/tapx/
29 stars 7 forks source link

Bug in prototype: etOffsetParent() returns BODY for new hidden elements in IE8 final #27

Open joostschouten opened 13 years ago

joostschouten commented 13 years ago

See: https://prototype.lighthouseapp.com/projects/8886/tickets/618-getoffsetparent-returns-body-for-new-hidden-elements-in-ie8-final

This bug is still around in prototype 1.7 and the fix below does the trick. Might be a good idea to include it here and maybe also in the tapestry5.3 included scripts.

Cheers, Joost

----- the fix -----

diff --git a/tapx-prototype/src/main/resources/com/howardlewisship/tapx/prototype/prototype.js b/tapx-prototype/src/main/resources/com/howardlewisship/tapx/prototype/prototype.js index 6b6c01f..79b00cd 100644 --- a/tapx-prototype/src/main/resources/com/howardlewisship/tapx/prototype/prototype.js +++ b/tapx-prototype/src/main/resources/com/howardlewisship/tapx/prototype/prototype.js @@ -3698,7 +3698,8 @@ Element.addMethods({ return $(document.body);

 var isInline = (Element.getStyle(element, 'display') === 'inline');