Ticket #31336: 31336.follow-up.diff
File 31336.follow-up.diff, 3.0 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/customize-controls.css
493 493 transition: left 0s; 494 494 } 495 495 496 .wp-full-overlay.section-open #customize-controls .wp-full-overlay-sidebar-content { 497 visibility: hidden; 498 overflow-y: hidden; 499 } 500 501 .wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open { 502 visibility: visible; 503 } 504 505 .wp-full-overlay.section-open .wp-full-overlay-sidebar-content .accordion-section.open .accordion-section-content { 506 overflow-y: auto; 507 } 508 496 509 p.customize-section-description { 497 510 font-style: normal; 498 511 margin-top: 22px; -
src/wp-admin/js/customize-controls.js
524 524 * @since 4.1.0 525 525 */ 526 526 attachEvents: function () { 527 var section = this, 528 backBtn = section.container.find( '.customize-section-back' ), 529 sectionTitle = section.container.find( '.accordion-section-title' ).first(); 527 var section = this; 530 528 531 529 // Expand/Collapse accordion sections on click. 532 530 section.container.find( '.accordion-section-title, .customize-section-back' ).on( 'click keydown', function( event ) { … … 537 535 538 536 if ( section.expanded() ) { 539 537 section.collapse(); 540 backBtn.attr( 'tabindex', '-1' );541 sectionTitle.attr( 'tabindex', '0' );542 sectionTitle.focus();543 538 } else { 544 539 section.expand(); 545 sectionTitle.attr( 'tabindex', '-1' );546 backBtn.attr( 'tabindex', '0' );547 backBtn.focus();548 540 } 549 541 }); 550 542 }, … … 592 584 container = section.container.closest( '.wp-full-overlay-sidebar-content' ), 593 585 content = section.container.find( '.accordion-section-content' ), 594 586 overlay = section.container.closest( '.wp-full-overlay' ), 587 backBtn = section.container.find( '.customize-section-back' ), 588 sectionTitle = section.container.find( '.accordion-section-title' ).first(), 595 589 expand; 596 590 597 591 if ( expanded && ! section.container.hasClass( 'open' ) ) { … … 606 600 position = content.offset().top; 607 601 scroll = container.scrollTop(); 608 602 content.css( 'margin-top', ( 45 - position - scroll ) ); 603 content.css( 'height', ( window.innerHeight - 90 ) ); 604 sectionTitle.attr( 'tabindex', '-1' ); 605 backBtn.attr( 'tabindex', '0' ); 606 backBtn.focus(); 609 607 if ( args.completeCallback ) { 610 608 args.completeCallback(); 611 609 } … … 634 632 overlay.removeClass( 'section-open' ); 635 633 content.css( 'margin-top', 'inherit' ); 636 634 container.scrollTop( 0 ); 637 section.container.find( '.accordion-section-title' ).focus(); 635 backBtn.attr( 'tabindex', '-1' ); 636 sectionTitle.attr( 'tabindex', '0' ); 637 sectionTitle.focus(); 638 638 if ( args.completeCallback ) { 639 639 args.completeCallback(); 640 640 }