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. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40482 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
45e83df257
commit
16b1859218
@ -708,6 +708,9 @@
|
||||
$( node ).data( 'rendered', false );
|
||||
editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
|
||||
wp.mce.views.createInstance( type, text, match.options, force ).render();
|
||||
|
||||
editor.selection.select( node );
|
||||
editor.nodeChanged();
|
||||
editor.focus();
|
||||
|
||||
return true;
|
||||
|
@ -982,7 +982,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||
|
||||
function hide( event ) {
|
||||
if ( activeToolbar ) {
|
||||
if ( activeToolbar.tempHide || event.type === 'hide' ) {
|
||||
if ( activeToolbar.tempHide || event.type === 'hide' || event.type === 'blur' ) {
|
||||
activeToolbar.hide();
|
||||
activeToolbar = false;
|
||||
} else if ( (
|
||||
|
Loading…
Reference in New Issue
Block a user