TinyMCE: Fix cursor position after updating a wpview node. Fix hiding the inline toolbar on editor blur.
Props iseulde, azaozz. Fixes #40480 for trunk. Built from https://develop.svn.wordpress.org/trunk@40481 git-svn-id: http://core.svn.wordpress.org/trunk@40357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1d739a0925
commit
c0399b4fde
|
@ -729,6 +729,9 @@
|
||||||
$( node ).data( 'rendered', false );
|
$( node ).data( 'rendered', false );
|
||||||
editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
|
editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
|
||||||
wp.mce.views.createInstance( type, text, match.options, force ).render();
|
wp.mce.views.createInstance( type, text, match.options, force ).render();
|
||||||
|
|
||||||
|
editor.selection.select( node );
|
||||||
|
editor.nodeChanged();
|
||||||
editor.focus();
|
editor.focus();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -992,7 +992,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
|
|
||||||
function hide( event ) {
|
function hide( event ) {
|
||||||
if ( activeToolbar ) {
|
if ( activeToolbar ) {
|
||||||
if ( activeToolbar.tempHide || event.type === 'hide' ) {
|
if ( activeToolbar.tempHide || event.type === 'hide' || event.type === 'blur' ) {
|
||||||
activeToolbar.hide();
|
activeToolbar.hide();
|
||||||
activeToolbar = false;
|
activeToolbar = false;
|
||||||
} else if ( (
|
} else if ( (
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.8-alpha-40480';
|
$wp_version = '4.8-alpha-40481';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue