Media modal: when inserting content, prefer the editor id passed while opening the modal. wpActiveEditor can change in the background. (Includes some precommit prefixed selectors.) Fixes #28173
Built from https://develop.svn.wordpress.org/trunk@29603 git-svn-id: http://core.svn.wordpress.org/trunk@29377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d869fe0603
commit
d0a76f284f
|
@ -1003,6 +1003,7 @@ th.action-links {
|
|||
}
|
||||
|
||||
.filter-links .current {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
border-bottom: 4px solid #666;
|
||||
color: #222;
|
||||
|
|
|
@ -1003,6 +1003,7 @@ th.action-links {
|
|||
}
|
||||
|
||||
.filter-links .current {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
border-bottom: 4px solid #666;
|
||||
color: #222;
|
||||
|
|
|
@ -1347,6 +1347,7 @@ div.action-links,
|
|||
float: left;
|
||||
clear: left;
|
||||
width: 65%;
|
||||
width: -webkit-calc( 100% - 180px );
|
||||
width: calc( 100% - 180px );
|
||||
}
|
||||
|
||||
|
|
|
@ -1347,6 +1347,7 @@ div.action-links,
|
|||
float: right;
|
||||
clear: right;
|
||||
width: 65%;
|
||||
width: -webkit-calc( 100% - 180px );
|
||||
width: calc( 100% - 180px );
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
/* global getUserSetting, tinymce, QTags, wpActiveEditor */
|
||||
/* global getUserSetting, tinymce, QTags */
|
||||
|
||||
// WordPress, TinyMCE, and Media
|
||||
// -----------------------------
|
||||
|
@ -757,10 +757,15 @@
|
|||
* @param {string} html Content to send to the editor
|
||||
*/
|
||||
insert: function( html ) {
|
||||
var editor,
|
||||
var editor, wpActiveEditor,
|
||||
hasTinymce = ! _.isUndefined( window.tinymce ),
|
||||
hasQuicktags = ! _.isUndefined( window.QTags ),
|
||||
hasQuicktags = ! _.isUndefined( window.QTags );
|
||||
|
||||
if ( this.activeEditor ) {
|
||||
wpActiveEditor = window.wpActiveEditor = this.activeEditor;
|
||||
} else {
|
||||
wpActiveEditor = window.wpActiveEditor;
|
||||
}
|
||||
|
||||
// Delegate to the global `send_to_editor` if it exists.
|
||||
// This attempts to play nice with any themes/plugins that have
|
||||
|
@ -921,7 +926,7 @@
|
|||
}
|
||||
|
||||
// If an empty `id` is provided, default to `wpActiveEditor`.
|
||||
id = wpActiveEditor;
|
||||
id = window.wpActiveEditor;
|
||||
|
||||
// If that doesn't work, fall back to `tinymce.activeEditor.id`.
|
||||
if ( ! id && ! _.isUndefined( window.tinymce ) && tinymce.activeEditor ) {
|
||||
|
@ -1053,6 +1058,7 @@
|
|||
options = options || {};
|
||||
|
||||
id = this.id( id );
|
||||
this.activeEditor = id;
|
||||
|
||||
workflow = this.get( id );
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue