Ticket #38850: 38850.2.patch
File 38850.2.patch, 3.2 KB (added by , 8 years ago) |
---|
-
src/wp-admin/css/edit.css
379 379 border-bottom: 0 none; 380 380 } 381 381 382 .wp-editor-expand div.mce-statusbar {382 .wp-editor-expand.toolbar-open div.mce-statusbar { 383 383 z-index: 1; 384 position: sticky; 385 position: -webkit-sticky; 386 bottom: 23px; /* #post-status-info: height + border-top */ 384 387 } 385 388 386 .wp-editor-expand #post-status-info {389 .wp-editor-expand.toolbar-open #post-status-info { 387 390 border-top: 1px solid #e5e5e5; 391 position: sticky; 392 position: -webkit-sticky; 393 bottom: -1px; /* border-bottom */ 388 394 } 389 395 390 396 .wp-editor-expand div.mce-toolbar-grp { 391 397 z-index: 999; 392 398 } 393 399 400 .wp-editor-expand .wp-editor-tools { 401 position: sticky; 402 position: -webkit-sticky; 403 top: 32px; 404 } 405 406 .wp-editor-expand div.mce-toolbar-grp, 407 .wp-editor-expand .quicktags-toolbar { 408 position: sticky; 409 position: -webkit-sticky; 410 top: 87px; /* admin bar height + tools height */ 411 } 412 394 413 /* TinyMCE native fullscreen mode override */ 395 414 .mce-fullscreen #wp-content-wrap .mce-menubar, 396 415 .mce-fullscreen #wp-content-wrap .mce-toolbar-grp, -
src/wp-admin/js/editor-expand.js
6 6 $adminBar = $( '#wpadminbar' ), 7 7 $footer = $( '#wpfooter' ); 8 8 9 var featureSticky = ( function() { 10 var element = document.createElement( 'div' ); 11 var style = element.style; 12 13 style.cssText = 'position:sticky;position:-webkit-sticky'; 14 15 return !! style.position; 16 } )(); 17 9 18 /* Autoresize editor. */ 10 19 $( function() { 11 20 var $wrap = $( '#postdivrich' ), … … 323 332 return; 324 333 } 325 334 335 if ( ! featureSticky ) { 336 326 337 topPos = $top.parent().offset().top; 327 338 editorPos = $editor.offset().top; 328 339 editorHeight = $editor.outerHeight(); … … 468 479 } 469 480 } 470 481 482 } // end ! featureSticky 483 471 484 // Sidebar pinning 472 485 if ( $postboxContainer.width() < 300 && heights.windowWidth > 600 && // sidebar position is changed with @media from CSS, make sure it is on the side 473 486 $document.height() > ( $sideSortables.height() + postBodyTop + 120 ) && // the sidebar is not the tallest element … … 558 571 fixedSideTop = fixedSideBottom = false; 559 572 } 560 573 561 if ( resize ) {574 if ( resize && ! featureSticky ) { 562 575 $contentWrap.css( { 563 576 paddingTop: heights.toolsHeight 564 577 } ); -
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
62 62 } 63 63 } 64 64 65 if ( editor.id === 'content' ) { 66 tinymce.$( '#postdivrich' ).toggleClass( 'toolbar-open', state !== 'hide' ) 67 } 68 65 69 editor.fire( 'wp-toolbar-toggle' ); 66 70 } 67 71 … … 72 76 onPostRender: function() { 73 77 wpAdvButton = this; 74 78 wpAdvButton.active( getUserSetting( 'hidetb' ) === '1' ? true : false ); 79 tinymce.$( '#postdivrich' ).toggleClass( 'toolbar-open', getUserSetting( 'hidetb' ) === '1' ) 75 80 } 76 81 }); 77 82