WordPress.org

Make WordPress Core

Changeset 40482


Ignore:
Timestamp:
04/19/2017 10:17:25 PM (2 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.

Merges [40481] to the 4.7 branch.
Fixes #40480.

Location:
branches/4.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/js/mce-view.js

    r39282 r40482  
    709709                    editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
    710710                    wp.mce.views.createInstance( type, text, match.options, force ).render();
     711
     712                    editor.selection.select( node );
     713                    editor.nodeChanged();
    711714                    editor.focus();
    712715
  • branches/4.7/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r39284 r40482  
    983983        function hide( event ) {
    984984            if ( activeToolbar ) {
    985                 if ( activeToolbar.tempHide || event.type === 'hide' ) {
     985                if ( activeToolbar.tempHide || event.type === 'hide' || event.type === 'blur' ) {
    986986                    activeToolbar.hide();
    987987                    activeToolbar = false;
Note: See TracChangeset for help on using the changeset viewer.