Shindig
  1. Shindig
  2. SHINDIG-1745

adjustHeight fails on Chrome 11 when using explicit height on top-level dom element

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.5.0-beta2
    • Component/s: Javascript
    • Labels:
    • Environment:
      Chrome 11 (Webkit)

      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>

        Activity

        Ed Venagila created issue -
        Hide
        Ed Venagila added a comment -

        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

        Show
        Ed Venagila added a comment - 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
        Ed Venagila made changes -
        Field Original Value New Value
        Description Given a gadget structured like the following snippet, the function getHeightForWebkit() returns 0:

        <body>
          <div id="content" style="height:500px">...</div>
        </body>
         
        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>
         
        Ed Venagila made changes -
        Attachment dynamic-height-height.js.patch [ 12521433 ]
        Hide
        Henry Saputra added a comment -

        +1

        Show
        Henry Saputra added a comment - +1
        Ed Venagila made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Henry Saputra added a comment -

        Ed, should this be clientHeight instead of offsetHeight bc the end of function its trying to add the border-bottom and padding-bottom?

        Show
        Henry Saputra added a comment - Ed, should this be clientHeight instead of offsetHeight bc the end of function its trying to add the border-bottom and padding-bottom?
        Dan Dumont made changes -
        Assignee Dan Dumont [ ddumont ]
        Hide
        Dan Dumont added a comment - - edited

        @Ed

        Can you try out the latest shindig with this patch: https://reviews.apache.org/r/5067/
        Your problem may be addressed with these changes.

        Show
        Dan Dumont added a comment - - edited @Ed Can you try out the latest shindig with this patch: https://reviews.apache.org/r/5067/ Your problem may be addressed with these changes.
        Hide
        Dan Dumont added a comment -
        Show
        Dan Dumont added a comment - Indirectly fixed by https://issues.apache.org/jira/browse/SHINDIG-1767
        Dan Dumont made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ryan Baxter made changes -
        Fix Version/s 2.5.0-beta2 [ 12321670 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        46m 38s 1 Ed Venagila 05/Apr/12 01:41
        Patch Available Patch Available Resolved Resolved
        36d 21h 5m 1 Dan Dumont 11/May/12 22:46

          People

          • Assignee:
            Dan Dumont
            Reporter:
            Ed Venagila
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development