Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#30608 closed defect (bug) (fixed)

Media: toolbar not restored after leaving iframe-based content

Reported by: mcsf's profile mcsf Owned by: azaozz's profile azaozz
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: Cc:


Observable on WPCOM, could affect sites that extend the Media Manager. Steps to reproduce:

  • Go to /wp-admin/post-new.php
  • Select Insert Media
  • Once the Media modal loads, select, if you have any, a view from the sidebar that loads an iframe. Such a view will replace the whole content + toolbar area. You might see a fake toolbar here if the iframe imitates it.
  • Again from the sidebar, select, if you have any, a custom view (i.e., not Insert Media or Create Gallery) that does not load an iframe.

Expected: the bottom toolbar, containing an Insert button, should be visible.
Observed: the toolbar “disappears” when going from the iframe-based view to the non-iframe-based view.

I used quotes because the toolbar isn’t actually disappearing—it’s actually not reappearing after we leave the iframe.

I'm attaching a working patch for this.

cc @dd32 @azaozz @pento

Attachments (1)

media-manager-iframe-cleanup.diff (714 bytes) - added by mcsf 9 years ago.

Download all attachments as: .zip

Change History (4)

#1 @azaozz
9 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.1

Thanks @mcsf for the patch.

Looks good to me as we are adding the hide-toolbar class in iframeContent() on creating the iframe, so we should be removing it too.

#2 @azaozz
9 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 30780:

Media: ensure the toolbar is shown after leaving iframe-based content. Props mcsf, fixes #30608.

#3 @ocean90
9 years ago

In 30792:

Fix JSHint error introduced in [30780].

see #30608.

Note: See TracTickets for help on using tickets.