WordPress.org

Make WordPress Core

Changeset 29603


Ignore:
Timestamp:
08/25/2014 07:36:12 PM (6 years ago)
Author:
azaozz
Message:

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

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r29596 r29603  
    10041004
    10051005.filter-links .current {
     1006    -webkit-box-shadow: none;
    10061007    box-shadow: none;
    10071008    border-bottom: 4px solid #666;
  • trunk/src/wp-admin/css/list-tables.css

    r29597 r29603  
    13481348    clear: right;
    13491349    width: 65%;
     1350    width: -webkit-calc( 100% - 180px );
    13501351    width: calc( 100% - 180px );
    13511352}
  • trunk/src/wp-includes/js/media-editor.js

    r29471 r29603  
    1 /* global getUserSetting, tinymce, QTags, wpActiveEditor */
     1/* global getUserSetting, tinymce, QTags */
    22
    33// WordPress, TinyMCE, and Media
     
    758758         */
    759759        insert: function( html ) {
    760             var editor,
     760            var editor, wpActiveEditor,
    761761                hasTinymce = ! _.isUndefined( window.tinymce ),
    762                 hasQuicktags = ! _.isUndefined( window.QTags ),
     762                hasQuicktags = ! _.isUndefined( window.QTags );
     763
     764            if ( this.activeEditor ) {
     765                wpActiveEditor = window.wpActiveEditor = this.activeEditor;
     766            } else {
    763767                wpActiveEditor = window.wpActiveEditor;
     768            }
    764769
    765770            // Delegate to the global `send_to_editor` if it exists.
     
    922927
    923928            // If an empty `id` is provided, default to `wpActiveEditor`.
    924             id = wpActiveEditor;
     929            id = window.wpActiveEditor;
    925930
    926931            // If that doesn't work, fall back to `tinymce.activeEditor.id`.
     
    10541059
    10551060            id = this.id( id );
     1061            this.activeEditor = id;
    10561062
    10571063            workflow = this.get( id );
Note: See TracChangeset for help on using the changeset viewer.