Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1696

calling gadgets.window.adjustWidth results in infinite loop

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.0-beta1
    • Fix Version/s: 2.5.0-beta1
    • Component/s: Javascript
    • Labels:

      Description

      This is a fix from Sarah Brolley. Thanks!

      The problem is that it didn't pass in the newWidth when calling adjustWidth in the call back function.

      var callback = null;
      if (isNaN(opt_width) && viewportWidth >= newWidth) {
      // Due to quirks in the width property, the auto-calculated width will
      // never be smaller than the size of the viewport. In order to decrease
      // the width to a fit size, we must first make the viewport too small (1px),
      // then callback a function that increases the frame to the right width.
      callback = function()

      { gadgets.window.adjustWidth(); ---> FIX: should pass in the new Width here }

      ;
      newWidth = 1;
      }
      gadgets.rpc.call(null, 'resize_iframe_width', callback, newWidth);

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lixu li xu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: