Make WordPress Core

Changeset 40481


Ignore:
Timestamp:
04/19/2017 10:09:44 PM (7 years ago)
Author:
azaozz
Message:

TinyMCE: Fix cursor position after updating a wpview node. Fix hiding the inline toolbar on editor blur.

Props iseulde, azaozz.
Fixes #40480 for trunk.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/mce-view.js

    r40019 r40481  
    730730                    editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
    731731                    wp.mce.views.createInstance( type, text, match.options, force ).render();
     732
     733                    editor.selection.select( node );
     734                    editor.nodeChanged();
    732735                    editor.focus();
    733736
  • trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r39916 r40481  
    993993        function hide( event ) {
    994994            if ( activeToolbar ) {
    995                 if ( activeToolbar.tempHide || event.type === 'hide' ) {
     995                if ( activeToolbar.tempHide || event.type === 'hide' || event.type === 'blur' ) {
    996996                    activeToolbar.hide();
    997997                    activeToolbar = false;
Note: See TracChangeset for help on using the changeset viewer.