The media browser widget resizes when I choose one of the tabs (library or upload) but when it first 'pops up', it is higher than its content.

Comments

gmclelland’s picture

Issue tags: +Needs screenshots

Can you provide screenshots to show this behavior?
What browser / OS are you using?

enochRoot’s picture

StatusFileSize
new59.36 KB
new81 KB

These shots are from Firefox 18.0.1 on Windows 7.
The first is how it shows up, the second is what it looks like after clicking one of the other tabs (with resize working) and then back on the first tab.

thx for your interest,
eR

enochRoot’s picture

StatusFileSize
new47.31 KB

Oh, and I just realized:
it also does not resize on different library pages, but I don't know if that's intended.

egontinno’s picture

In media/js/media.browser.js change

// Instantiate the tabs.
$('#media-browser-tabset').tabs({
      // Ensure that the modal resizes to the content on each tab switch.
      show: Drupal.media.browser.resizeIframe
});

to

// Instantiate the tabs.
$('#media-browser-tabset').tabs({
      // Ensure that the modal resizes to the content on each tab switch.
      activate: Drupal.media.browser.resizeIframe
});

After that tabs will resize.
Source: http://api.jqueryui.com/tabs/#event-activate

jrbeeman’s picture

For what it's worth, this appears to be fixed in 7.x-2.x:
https://drupal.org/commitlog/commit/698/e2625edf88f98782396cb879e0368105...

enochRoot’s picture

It 'appears' to be fixed?
I don't know when I'll be able to check out the new version in our environment, so if anybody can confirm that it's fixed please feel free to close this issue.

thx,
eR

ParisLiakos’s picture

Status: Active » Closed (duplicate)

it contains the fix in #4