From cc8cc98e92285a30231e8b53320fb617c2d8c945 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Mon, 16 Jan 2017 00:21:29 +0000 Subject: [PATCH] TinyMCE: ensure the inline toolbar is shown and properly positioned when there are several wpview blocks in the editor and the user selects one after the other. Props gitlost. Fixes #38849. git-svn-id: https://develop.svn.wordpress.org/trunk@39910 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/tinymce/plugins/wordpress/plugin.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js b/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js index 79d56d2251..611450e066 100644 --- a/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js @@ -966,11 +966,12 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { } if ( args.toolbar ) { - if ( activeToolbar !== args.toolbar ) { - activeToolbar = args.toolbar; - activeToolbar.show(); - } else { + activeToolbar = args.toolbar; + + if ( activeToolbar.visible() ) { activeToolbar.reposition(); + } else { + activeToolbar.show(); } } else { activeToolbar = false;