Ticket #29338: 29338.3.patch
File 29338.3.patch, 1.2 KB (added by , 11 years ago) |
---|
-
src/wp-admin/js/editor-expand.js
223 223 } 224 224 225 225 function mceHide() { 226 var wrapHeight = $( '#wpwrap' ).height(); 226 var wrapHeight = $( '#wpwrap' ).height(), 227 windowPos = $window.scrollTop(), 228 iframeHeight, textareaHeight, scroll, topPos; 227 229 228 230 textEditorResize(); 231 iframeHeight = $('#content_ifr').height(); 232 textareaHeight = $textEditor.height(); 229 233 230 if ( wrapHeight && $window.scrollTop() > wrapHeight ) { 234 if ( iframeHeight > textareaHeight && ( windowPos + heights.windowHeight ) > ( textareaHeight + $textEditor.offset().top ) ) { 235 scroll = iframeHeight - textareaHeight - 1; 236 topPos = $textEditor.parent().offset().top - heights.toolsHeight - heights.adminBarHeight; 237 238 if ( windowPos - scroll < topPos ) { 239 window.scrollTo( window.pageXOffset, topPos ); 240 } else { 241 window.scrollBy( 0, -scroll ); 242 } 243 244 adjust(); 245 window.scrollBy( 0, 1 ); 246 } else if ( wrapHeight && windowPos > wrapHeight ) { 231 247 window.scrollTo( window.pageXOffset, wrapHeight - 1 ); 232 248 } 233 249