From 45c606576c71d08300bed4fe51c3622996bb3df3 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 17 Sep 2015 00:09:40 +0000 Subject: [PATCH] Media JS: ensure that `wp.media.frame` (a static reference to the "current" `Frame`) is reset when a cached frame is opened. Fixes #33458. git-svn-id: https://develop.svn.wordpress.org/trunk@34254 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-includes/js/media-editor.js b/src/wp-includes/js/media-editor.js index 9d84a4b271..5bf5bd3ffa 100644 --- a/src/wp-includes/js/media-editor.js +++ b/src/wp-includes/js/media-editor.js @@ -670,6 +670,7 @@ */ frame: function() { if ( this._frame ) { + wp.media.frame = this._frame; return this._frame; } @@ -1067,6 +1068,8 @@ workflow = this.add( id, options ); } + wp.media.frame = workflow; + return workflow.open(); },