diff --git a/src/wp-includes/css/editor.css b/src/wp-includes/css/editor.css index c055704ca8..e1a8931a91 100644 --- a/src/wp-includes/css/editor.css +++ b/src/wp-includes/css/editor.css @@ -165,6 +165,7 @@ div.mce-inline-toolbar-grp { box-sizing: border-box; margin-bottom: 8px; position: absolute; + visibility: hidden; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; @@ -256,6 +257,10 @@ div.mce-inline-toolbar-grp.mce-arrow-full > div { overflow-x: auto; } +div.mce-inline-toolbar-grp-active { + visibility: visible; +} + div.mce-toolbar-grp > div { padding: 3px; } diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js index c05a73a29a..df1d49c376 100644 --- a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js @@ -309,16 +309,12 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) { } floatingToolbar.on( 'show', function() { - var self = this; - toolbarIsHidden = false; - setTimeout( function() { - if ( self._visible ) { - DOM.addClass( self.getEl(), 'mce-inline-toolbar-grp-active' ); - self.reposition(); - } - }, 100 ); + if ( this._visible ) { + this.reposition(); + DOM.addClass( this.getEl(), 'mce-inline-toolbar-grp-active' ); + } } ); floatingToolbar.on( 'hide', function() {