WordPress.org

Make WordPress Core

Ticket #48751: 48751.diff

File 48751.diff, 1.8 KB (added by garrett-eclipse, 20 months ago)

Initial patch to have row-actions persistent and not hide.

  • src/js/_enqueues/admin/common.js

     
    882882                        });
    883883        });
    884884
    885         /**
    886          * Shows row actions on focus of its parent container element or any other elements contained within.
    887          *
    888          * @return {void}
    889          */
    890         $( '#wpbody-content' ).on({
    891                 focusin: function() {
    892                         clearTimeout( transitionTimeout );
    893                         focusedRowActions = $( this ).find( '.row-actions' );
    894                         // transitionTimeout is necessary for Firefox, but Chrome won't remove the CSS class without a little help.
    895                         $( '.row-actions' ).not( this ).removeClass( 'visible' );
    896                         focusedRowActions.addClass( 'visible' );
    897                 },
    898                 focusout: function() {
    899                         // Tabbing between post title and .row-actions links needs a brief pause, otherwise
    900                         // the .row-actions div gets hidden in transit in some browsers (ahem, Firefox).
    901                         transitionTimeout = setTimeout( function() {
    902                                 focusedRowActions.removeClass( 'visible' );
    903                         }, 30 );
    904                 }
    905         }, '.has-row-actions' );
    906 
    907885        // Toggle list table rows on small screens.
    908886        $( 'tbody' ).on( 'click', '.toggle-row', function() {
    909887                $( this ).closest( 'tr' ).toggleClass( 'is-expanded' );
  • src/wp-admin/css/list-tables.css

     
    807807        color: #ddd;
    808808        font-size: 13px;
    809809        padding: 2px 0 0;
    810         position: relative;
    811         left: -9999em;
    812810}
    813811
    814812/* ticket #34150 */
     
    821819        color: #000;
    822820}
    823821
    824 .no-js .row-actions,
    825 tr:hover .row-actions,
    826 .mobile .row-actions,
    827 .row-actions.visible,
    828 .comment-item:hover .row-actions {
    829         position: static;
    830 }
    831 
    832822/* deprecated */
    833823.row-actions-visible {
    834824        padding: 2px 0 0;