From e66dc656b37266f9094e67feddb874dad884548f Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sun, 15 Jan 2017 02:59:45 +0000 Subject: [PATCH] TinyMCE: prevent the inline toolbar from appearing on partially selected wpview nodes. This can happen when HTML is initially loaded in the editor and wpview is the first node, or sometimes on repeatedly pasting the same wpview. Props gitlost. Fixes #38849. git-svn-id: https://develop.svn.wordpress.org/trunk@39904 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/tinymce/plugins/wpview/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/tinymce/plugins/wpview/plugin.js b/src/wp-includes/js/tinymce/plugins/wpview/plugin.js index e131474831..33457c412f 100644 --- a/src/wp-includes/js/tinymce/plugins/wpview/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wpview/plugin.js @@ -190,7 +190,7 @@ ] ); editor.on( 'wptoolbar', function( event ) { - if ( isView( event.element ) ) { + if ( ! event.collapsed && isView( event.element ) ) { event.toolbar = toolbar; } } );