TinyMCE: when inserting a wpview, place the caret after is so the user can continue typing without interruption.
Props iseulde. Fixes #39337. Built from https://develop.svn.wordpress.org/trunk@39903 git-svn-id: http://core.svn.wordpress.org/trunk@39840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
90f441e1b4
commit
45f3ee380c
|
@ -428,6 +428,7 @@
|
|||
*/
|
||||
replaceMarkers: function() {
|
||||
this.getMarkers( function( editor, node ) {
|
||||
var selected = node === editor.selection.getNode();
|
||||
var $viewNode;
|
||||
|
||||
if ( ! this.loader && $( node ).text() !== this.text ) {
|
||||
|
@ -440,6 +441,13 @@
|
|||
);
|
||||
|
||||
editor.$( node ).replaceWith( $viewNode );
|
||||
|
||||
if ( selected ) {
|
||||
setTimeout( function() {
|
||||
editor.selection.select( $viewNode[0] );
|
||||
editor.selection.collapse();
|
||||
} );
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.8-alpha-39902';
|
||||
$wp_version = '4.8-alpha-39903';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue