TinyMCE: always focus the editor after using the floated toolbar.

Props iseulde. Fixes #30619.
Built from https://develop.svn.wordpress.org/trunk@31972


git-svn-id: http://core.svn.wordpress.org/trunk@31951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-04-01 21:50:27 +00:00
parent 8f6f787d13
commit c545c63606
3 changed files with 4 additions and 2 deletions

View File

@ -650,6 +650,7 @@ window.wp = window.wp || {};
$( 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 ).render(); wp.mce.views.createInstance( type, text, match.options ).render();
editor.focus();
return true; return true;
} }
@ -665,6 +666,7 @@ window.wp = window.wp || {};
remove: function( editor, node ) { remove: function( editor, node ) {
$( node ).trigger( 'wp-mce-view-unbind' ); $( node ).trigger( 'wp-mce-view-unbind' );
editor.dom.remove( node ); editor.dom.remove( node );
editor.focus();
} }
} ); } );
} )( window, window.wp, window.jQuery ); } )( window, window.wp, window.jQuery );

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-beta3-31971'; $wp_version = '4.2-beta3-31972';
/** /**
* 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.