Displaying 1 result from an estimated 1 matches for "hiddenancestor".
2008 Jun 19
7
getDimensions() fails for elements with ancestors with display: none
...''s ancestors are hidden, Element.getDimensions()
returns misleading values. In order to address this in my own project,
I made the following modification:
getDimensions: function(element) {
element = $(element);
var display = element.getStyle(''display'');
+ var hiddenAncestor = element.ancestors().any(function(e)
{ return e.getStyle(''display'') == ''none''; });
- if (display != ''none'' && display != null) // Safari bug
+ if (display != ''none'' && display != null && !hiddenA...