dynamic-height feature overestimates the height of gadgets that have elements 
with clipped overflow in Webkit
-------------------------------------------------------------------------------------------------------------

                 Key: SHINDIG-1421
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1421
             Project: Shindig
          Issue Type: Bug
          Components: Javascript 
    Affects Versions: 2.0.0-RC2
         Environment: WebKit
            Reporter: Mat Mannion
            Priority: Minor
             Fix For: 2.0.0


In WebKit, the dynamic-height feature has a special-case calculation that takes 
each element in turn and finds the maximal value of the offsetTop and the 
scrollHeight, in an attempt to find the lowest point of the gadgets' content. 
This calculation is only run in WebKit browsers, and only when a specific 
height isn't passed to gadgets.io.adjustHeight()

The problem with this is when there is an element in the gadget which clips the 
y-overflow (i.e. that has any value other than 'visible') and also specifies 
the height. In this situation, scrollHeight returns the _actual_ height of the 
content, not the height as it is displayed. If an element has 300px worth of 
content but has overflow: auto and height: 200px, it will display as a 200px 
element on the page with a vertical scrollbar, but element.scrollHeight will 
still return a value of 300px.

The fix for this is two-fold. Firstly, we should use offsetHeight instead of 
scrollHeight, and secondly we should not consider elements that are children of 
a clipped-overflow element for determining the maximal height of the content 
(as elements that are below the scroll fold are considered).

Patch forthcoming.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to