Make WordPress Core

Ticket #30696: 30696.2.patch

File 30696.2.patch, 709 bytes (added by iseulde, 10 years ago)
  • src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js

     
    238238                left = boundaryMiddle - toolbarHalf;
    239239                left += iframePos.x;
    240240
    241                 if ( toolbarWidth >= windowWidth ) {
     241                if ( boundary.left < 0 || boundary.right > iframeWidth ) {
     242                        left = iframePos.x + ( iframeWidth - toolbarWidth ) / 2;
     243                } else if ( toolbarWidth >= windowWidth ) {
    242244                        className += ' mce-arrow-full';
    243245                        left = 0;
    244246                } else if ( ( left < 0 && boundary.left + toolbarWidth > windowWidth ) ||