TinyMCE: fix flickering inline toolbar when hovering over the buttons there and the vertical scrollbar is not shown (the page height is less than the window height). Improves/removes the previous fix for similar flickering but only in RTL, see #42018.
Props joakimsilfverberg, mukesh27, kokers, Howdy_McGee, noisysocks, azaozz. Fixes #44911. Built from https://develop.svn.wordpress.org/trunk@45610 git-svn-id: http://core.svn.wordpress.org/trunk@45421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c71bc1513e
commit
4a273484f3
|
@ -803,11 +803,6 @@ div.mce-menu .mce-menu-item-sep,
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't show the tooltip. Used in Chrome RTL, see #42018 */
|
|
||||||
.rtl .mce-tooltip.wp-hide-mce-tooltip {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mce-tooltip-inner {
|
.mce-tooltip-inner {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -803,11 +803,6 @@ div.mce-menu .mce-menu-item-sep,
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't show the tooltip. Used in Chrome RTL, see #42018 */
|
|
||||||
.rtl .mce-tooltip.wp-hide-mce-tooltip {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mce-tooltip-inner {
|
.mce-tooltip-inner {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -788,8 +788,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
mceIframe = document.getElementById( editor.id + '_ifr' ),
|
mceIframe = document.getElementById( editor.id + '_ifr' ),
|
||||||
mceToolbar,
|
mceToolbar,
|
||||||
mceStatusbar,
|
mceStatusbar,
|
||||||
wpStatusbar,
|
wpStatusbar;
|
||||||
isChromeRtl = ( editor.rtl && /Chrome/.test( navigator.userAgent ) );
|
|
||||||
|
|
||||||
if ( container ) {
|
if ( container ) {
|
||||||
mceToolbar = tinymce.$( '.mce-toolbar-grp', container )[0];
|
mceToolbar = tinymce.$( '.mce-toolbar-grp', container )[0];
|
||||||
|
@ -1040,16 +1039,6 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
|
|
||||||
toolbar.on( 'show', function() {
|
toolbar.on( 'show', function() {
|
||||||
this.reposition();
|
this.reposition();
|
||||||
|
|
||||||
if ( isChromeRtl ) {
|
|
||||||
tinymce.$( '.mce-widget.mce-tooltip' ).addClass( 'wp-hide-mce-tooltip' );
|
|
||||||
}
|
|
||||||
} );
|
|
||||||
|
|
||||||
toolbar.on( 'hide', function() {
|
|
||||||
if ( isChromeRtl ) {
|
|
||||||
tinymce.$( '.mce-widget.mce-tooltip' ).removeClass( 'wp-hide-mce-tooltip' );
|
|
||||||
}
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
toolbar.on( 'keydown', function( event ) {
|
toolbar.on( 'keydown', function( event ) {
|
||||||
|
@ -1140,14 +1129,15 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
editor.dom.bind( editor.getWin(), 'resize', hide );
|
|
||||||
|
|
||||||
if ( editor.inline ) {
|
if ( editor.inline ) {
|
||||||
|
editor.on( 'resizewindow', hide );
|
||||||
|
|
||||||
// Enable `capture` for the event.
|
// Enable `capture` for the event.
|
||||||
// This will hide/reposition the toolbar on any scrolling in the document.
|
// This will hide/reposition the toolbar on any scrolling in the document.
|
||||||
document.addEventListener( 'scroll', hide, true );
|
document.addEventListener( 'scroll', hide, true );
|
||||||
} else {
|
} else {
|
||||||
editor.dom.bind( editor.getWin(), 'scroll', hide );
|
editor.dom.bind( editor.getWin(), 'scroll', hide );
|
||||||
|
|
||||||
// For full height iframe editor.
|
// For full height iframe editor.
|
||||||
editor.on( 'resizewindow scrollwindow', hide );
|
editor.on( 'resizewindow scrollwindow', hide );
|
||||||
}
|
}
|
||||||
|
@ -1155,7 +1145,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
editor.on( 'remove', function() {
|
editor.on( 'remove', function() {
|
||||||
document.removeEventListener( 'scroll', hide, true );
|
document.removeEventListener( 'scroll', hide, true );
|
||||||
editor.off( 'resizewindow scrollwindow', hide );
|
editor.off( 'resizewindow scrollwindow', hide );
|
||||||
editor.dom.unbind( editor.getWin(), 'resize scroll', hide );
|
editor.dom.unbind( editor.getWin(), 'scroll', hide );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
editor.on( 'blur hide', hide );
|
editor.on( 'blur hide', hide );
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45609';
|
$wp_version = '5.3-alpha-45610';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue