diff --git a/tinymce-single/tinymce/block.js b/tinymce-single/tinymce/block.js index 4e1072a6fa55dc..24afe661330e0a 100644 --- a/tinymce-single/tinymce/block.js +++ b/tinymce-single/tinymce/block.js @@ -328,6 +328,7 @@ var toolbar = this.getEl(); var block = getSelectedBlock(); var isRightAligned = editor.$( block ).hasClass( 'alignright' ); + var isFullBleed = editor.$( block ).hasClass( 'alignfull' ); var toolbarRect = toolbar.getBoundingClientRect(); var blockRect = block.getBoundingClientRect(); var contentRect = editor.getBody().getBoundingClientRect(); @@ -338,10 +339,16 @@ var left = contentRect.left + 50 } + if ( isFullBleed ) { + var top = blockRect.top - toolbarRect.height - 10; + } else { + var top = blockRect.top; + } + DOM.setStyles( toolbar, { position: 'absolute', left: left + 'px', - top: blockRect.top + window.pageYOffset + 'px' + top: top + window.pageYOffset + 'px' } ); this.show();