From 7446faa7fb60611fb66465d07a82bed030897952 Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Tue, 24 Sep 2013 02:03:41 +0000 Subject: [PATCH] Allow non-visible post row actions to be accessed via keyboard. props adamsilverstein, lessbloat. fixes #21334. git-svn-id: https://develop.svn.wordpress.org/trunk@25593 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/inline-edit-post.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/wp-admin/js/inline-edit-post.js b/src/wp-admin/js/inline-edit-post.js index cc28130874..5c73c75a2c 100644 --- a/src/wp-admin/js/inline-edit-post.js +++ b/src/wp-admin/js/inline-edit-post.js @@ -69,6 +69,20 @@ inlineEditPost = { t.revert(); $('select[name^="action"]').val('-1'); }); + + // Show the 'quick links' section when user tabs into post title triggering focus. + var transitionTimeout, focusedRow; + $( 'td.post-title' ).focusin(function(){ + clearTimeout( transitionTimeout ); + focusedRow = $(this); + focusedRow.find( '.row-actions' ).addClass( 'visible' ); + }).focusout(function(){ + // Tabbing between post title and .row-actions links needs a brief pause, otherwise + // the .row-actions div gets hidden in transit in some browsers (ahem, Firefox). + transitionTimeout = setTimeout(function(){ + focusedRow.find( '.row-actions' ).removeClass( 'visible' ); + }, 30); + }); }, toggle : function(el){