Make WordPress Core

Changeset 38160


Ignore:
Timestamp:
07/27/2016 02:58:27 AM (9 years ago)
Author:
azaozz
Message:

TinyMCE: fix the calculation for the inline toolbar vertical position.

Fixes #37481.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r38110 r38160  
    769769                    toolbar = this.getEl(),
    770770                    toolbarWidth = toolbar.offsetWidth,
    771                     toolbarHeight = toolbar.offsetHeight,
     771                    toolbarHeight = toolbar.clientHeight,
    772772                    selection = currentSelection.getBoundingClientRect(),
    773773                    selectionMiddle = ( selection.left + selection.right ) / 2,
    774774                    buffer = 5,
    775                     margin = 8,
    776                     spaceNeeded = toolbarHeight + margin + buffer,
     775                    spaceNeeded = toolbarHeight + buffer,
    777776                    wpAdminbarBottom = wpAdminbar ? wpAdminbar.getBoundingClientRect().bottom : 0,
    778777                    mceToolbarBottom = mceToolbar ? mceToolbar.getBoundingClientRect().bottom : 0,
     
    808807                    } else if ( spaceTop >= spaceNeeded ) {
    809808                        className = ' mce-arrow-down';
    810                         top = selection.top + iframeRect.top + scrollY - toolbarHeight - margin + iosOffsetTop;
     809                        top = selection.top + iframeRect.top + scrollY - toolbarHeight + iosOffsetTop;
    811810                    }
    812811                } else {
    813812                    if ( spaceTop >= spaceNeeded ) {
    814813                        className = ' mce-arrow-down';
    815                         top = selection.top + iframeRect.top + scrollY - toolbarHeight - margin + iosOffsetTop;
     814                        top = selection.top + iframeRect.top + scrollY - toolbarHeight + iosOffsetTop;
    816815                    } else if ( spaceBottom >= spaceNeeded && editorHeight / 2 > selection.bottom + iframeRect.top - blockedTop ) {
    817816                        className = ' mce-arrow-up';
Note: See TracChangeset for help on using the changeset viewer.