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 | | |