TinyMCE wpView: properly deselect views when hiding the editor. Do not remove selected on PreProcess.

Fixes #32045.

git-svn-id: https://develop.svn.wordpress.org/trunk@32257 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-04-21 21:31:26 +00:00
parent 19c0b3f469
commit 312edcbc9d

View File

@ -361,9 +361,6 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
// Remove marker attributes
$( 'p[data-wpview-marker]', rootNode ).attr( 'data-wpview-marker', null );
// Reset the selected node if any
selected = null;
}
editor.on( 'PreProcess', function( event ) {
@ -374,6 +371,7 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
editor.on( 'hide', function() {
// Replace the view nodes with their text directly in the editor body.
wp.mce.views.unbind();
deselect();
resetViews( editor.getBody() );
});