From e5d660e597836dc75dc7d4010153d3ac50af9879 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 1 Apr 2015 21:49:03 +0000 Subject: [PATCH] TinyMCE: always focus the editor after using the floated toolbar. Props iseulde. Fixes #30619. git-svn-id: https://develop.svn.wordpress.org/trunk@31972 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/mce-view.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/js/mce-view.js b/src/wp-includes/js/mce-view.js index 98174543b0..b54470dba1 100644 --- a/src/wp-includes/js/mce-view.js +++ b/src/wp-includes/js/mce-view.js @@ -650,6 +650,7 @@ window.wp = window.wp || {}; $( node ).data( 'rendered', false ); editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) ); wp.mce.views.createInstance( type, text, match.options ).render(); + editor.focus(); return true; } @@ -665,6 +666,7 @@ window.wp = window.wp || {}; remove: function( editor, node ) { $( node ).trigger( 'wp-mce-view-unbind' ); editor.dom.remove( node ); + editor.focus(); } } ); } )( window, window.wp, window.jQuery );