From a04930b34050c9f5c4bfe595c6f402fbd09d203d Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Wed, 10 Oct 2012 08:47:15 +0000 Subject: [PATCH] Reset the media modal to the library view after inserting a gallery. fixes #22151, see #21390, #21809. git-svn-id: https://develop.svn.wordpress.org/trunk@22156 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/js/media-upload.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js index 93204a3144..caf609de44 100644 --- a/wp-admin/js/media-upload.js +++ b/wp-admin/js/media-upload.js @@ -122,6 +122,9 @@ var tb_position; shortcode = view.gallery.shortcode( selection ); this.insert( shortcode.string() ); + + // Reset the workflow view to the library. + workflow.render('library'); }, this ); return workflow;