[ 
https://issues.apache.org/jira/browse/SHINDIG-1745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ed Venagila updated SHINDIG-1745:
---------------------------------

    Description: 
Given a gadget structured like the following snippet, 
gadgets.window.adjustHeight() does not call the container to change the height 
of the iframe:

<body>
  <div id="content" style="height:500px">...</div>
</body>
 

  was:
Given a gadget structured like the following snippet, the function 
getHeightForWebkit() returns 0:

<body>
  <div id="content" style="height:500px">...</div>
</body>
 


Since adjustHeight() is called without an arg, the hight computation is 
triggered. This delegates to getHeightForWebkit(), which returns 0. A later 
check aborts the RPC call to the container.

getHeightForWebkit() properly detects the height property, either directly from 
the style, or if this height is attributed by css. It then skips any further 
calculation, without updating the local var result.

In keeping with the logic used in walking though child elements, that computes 
the maximal bottom edge, I propose setting the initial value to the 
document.body.offsetHeight, rather than 0.

Patch file is attached
                
> adjustHeight fails on Chrome 11 when using explicit height on top-level dom 
> element
> -----------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1745
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1745
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>    Affects Versions: 2.0.2
>         Environment: Chrome 11 (Webkit)
>            Reporter: Ed Venagila
>            Priority: Minor
>              Labels: features
>         Attachments: dynamic-height-height.js.patch
>
>
> Given a gadget structured like the following snippet, 
> gadgets.window.adjustHeight() does not call the container to change the 
> height of the iframe:
> <body>
>   <div id="content" style="height:500px">...</div>
> </body>
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to