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

calling gadgets.window.adjustWidth results in infinite loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.5.0-beta1
    • 2.5.0-beta1
    • Javascript

    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

        1. dynamicWidth.patch
          1.0 kB
          Li Xu

        Activity

          People

            Unassigned Unassigned
            lixu Li Xu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: