From 8719a8a8b0e088c8b9530135cdeacf4bd145a5d8 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sun, 7 Dec 2014 21:11:23 +0000 Subject: [PATCH] Media: ensure the toolbar is shown after leaving iframe-based content. Props mcsf, fixes #30608. git-svn-id: https://develop.svn.wordpress.org/trunk@30780 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-views.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index c5de8f2c45..39d46bd258 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -2395,6 +2395,7 @@ }, this ); this.on( 'content:create:iframe', this.iframeContent, this ); + this.on( 'content:deactivate:iframe', this.iframeContentCleanup, this ); this.on( 'menu:render:default', this.iframeMenu, this ); this.on( 'open', this.hijackThickbox, this ); this.on( 'close', this.restoreThickbox, this ); @@ -2411,6 +2412,10 @@ }); }, + iframeContentCleanup: function( content ) { + this.$el.removeClass('hide-toolbar'); + }, + iframeMenu: function( view ) { var views = {};