diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index abdf402e62e..8a8836bd54f 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -233,6 +233,15 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ if ($article.size() > 0) { $articles.removeClass('selected'); $article.addClass('selected'); + + if ($article.is('.topic-post')) { + var tabLoc = $article.find('a.tabLoc'); + if (tabLoc.length === 0) { + tabLoc = $(''); + $article.prepend(tabLoc); + } + tabLoc.focus(); + } var rgx = new RegExp("post-cloak-(\\d+)").exec($article.parent()[0].id); if (rgx === null || typeof rgx[1] === 'undefined') {