TinyMCE: fix the calculation for the inline toolbar vertical position.
Fixes #37481. Built from https://develop.svn.wordpress.org/trunk@38160 git-svn-id: http://core.svn.wordpress.org/trunk@38101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5bccb0020d
commit
37018fded6
|
@ -768,12 +768,11 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
},
|
},
|
||||||
toolbar = this.getEl(),
|
toolbar = this.getEl(),
|
||||||
toolbarWidth = toolbar.offsetWidth,
|
toolbarWidth = toolbar.offsetWidth,
|
||||||
toolbarHeight = toolbar.offsetHeight,
|
toolbarHeight = toolbar.clientHeight,
|
||||||
selection = currentSelection.getBoundingClientRect(),
|
selection = currentSelection.getBoundingClientRect(),
|
||||||
selectionMiddle = ( selection.left + selection.right ) / 2,
|
selectionMiddle = ( selection.left + selection.right ) / 2,
|
||||||
buffer = 5,
|
buffer = 5,
|
||||||
margin = 8,
|
spaceNeeded = toolbarHeight + buffer,
|
||||||
spaceNeeded = toolbarHeight + margin + buffer,
|
|
||||||
wpAdminbarBottom = wpAdminbar ? wpAdminbar.getBoundingClientRect().bottom : 0,
|
wpAdminbarBottom = wpAdminbar ? wpAdminbar.getBoundingClientRect().bottom : 0,
|
||||||
mceToolbarBottom = mceToolbar ? mceToolbar.getBoundingClientRect().bottom : 0,
|
mceToolbarBottom = mceToolbar ? mceToolbar.getBoundingClientRect().bottom : 0,
|
||||||
mceStatusbarTop = mceStatusbar ? windowHeight - mceStatusbar.getBoundingClientRect().top : 0,
|
mceStatusbarTop = mceStatusbar ? windowHeight - mceStatusbar.getBoundingClientRect().top : 0,
|
||||||
|
@ -807,12 +806,12 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||||
top = selection.bottom + iframeRect.top + scrollY - iosOffsetBottom;
|
top = selection.bottom + iframeRect.top + scrollY - iosOffsetBottom;
|
||||||
} else if ( spaceTop >= spaceNeeded ) {
|
} else if ( spaceTop >= spaceNeeded ) {
|
||||||
className = ' mce-arrow-down';
|
className = ' mce-arrow-down';
|
||||||
top = selection.top + iframeRect.top + scrollY - toolbarHeight - margin + iosOffsetTop;
|
top = selection.top + iframeRect.top + scrollY - toolbarHeight + iosOffsetTop;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( spaceTop >= spaceNeeded ) {
|
if ( spaceTop >= spaceNeeded ) {
|
||||||
className = ' mce-arrow-down';
|
className = ' mce-arrow-down';
|
||||||
top = selection.top + iframeRect.top + scrollY - toolbarHeight - margin + iosOffsetTop;
|
top = selection.top + iframeRect.top + scrollY - toolbarHeight + iosOffsetTop;
|
||||||
} else if ( spaceBottom >= spaceNeeded && editorHeight / 2 > selection.bottom + iframeRect.top - blockedTop ) {
|
} else if ( spaceBottom >= spaceNeeded && editorHeight / 2 > selection.bottom + iframeRect.top - blockedTop ) {
|
||||||
className = ' mce-arrow-up';
|
className = ' mce-arrow-up';
|
||||||
top = selection.bottom + iframeRect.top + scrollY - iosOffsetBottom;
|
top = selection.bottom + iframeRect.top + scrollY - iosOffsetBottom;
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-beta4-38159';
|
$wp_version = '4.6-beta4-38160';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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