Make WordPress Core

Ticket #38849: 38849.patch

File 38849.patch, 1.2 KB (added by gitlost, 9 years ago)

Check view selected on setting toolbar and always resposition and show.

  • src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

     
    963963                        }
    964964
    965965                        if ( args.toolbar ) {
    966                                 if ( activeToolbar !== args.toolbar ) {
    967                                         activeToolbar = args.toolbar;
    968                                         activeToolbar.show();
    969                                 } else {
    970                                         activeToolbar.reposition();
    971                                 }
     966                                activeToolbar = args.toolbar;
     967                                activeToolbar.reposition();
     968                                activeToolbar.show();
    972969                        } else {
    973970                                activeToolbar = false;
    974971                        }
  • src/wp-includes/js/tinymce/plugins/wpview/plugin.js

     
    190190                                ] );
    191191
    192192                                editor.on( 'wptoolbar', function( event ) {
    193                                         if ( isView( event.element ) ) {
     193                                        if ( ! event.collapsed && isView( event.element ) ) {
    194194                                                event.toolbar = toolbar;
    195195                                        }
    196196                                } );