TinyMCE: ensure the image toolbar stays visible when the image is much wider than the editor. Props iseulde, fixes #20696 for trunk.

Built from https://develop.svn.wordpress.org/trunk@31362


git-svn-id: http://core.svn.wordpress.org/trunk@31343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-02-06 23:00:23 +00:00
parent c765424ad5
commit c8892dfaa2
4 changed files with 5 additions and 3 deletions

View File

@ -238,7 +238,9 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
left = boundaryMiddle - toolbarHalf;
left += iframePos.x;
if ( toolbarWidth >= windowWidth ) {
if ( boundary.left < 0 || boundary.right > iframeWidth ) {
left = iframePos.x + ( iframeWidth - toolbarWidth ) / 2;
} else if ( toolbarWidth >= windowWidth ) {
className += ' mce-arrow-full';
left = 0;
} else if ( ( left < 0 && boundary.left + toolbarWidth > windowWidth ) ||

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31361';
$wp_version = '4.2-alpha-31362';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.