Remove href attribute from tab link to prevent duplicate event on enter.

Because Discourse doesn't preventDefault on links with an href of "#"
this tab-able link was firing a click event when enter was pressed. This
had the unfortunate side effect of breaking the history, making routing
and navigation unreliable.
This commit is contained in:
Kelle Connolly 2014-10-22 17:29:16 +11:00
parent ea681d92a2
commit 0d461f16a7
1 changed files with 1 additions and 1 deletions

View File

@ -237,7 +237,7 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
if ($article.is('.topic-post')) { if ($article.is('.topic-post')) {
var tabLoc = $article.find('a.tabLoc'); var tabLoc = $article.find('a.tabLoc');
if (tabLoc.length === 0) { if (tabLoc.length === 0) {
tabLoc = $('<a href="#" class="tabLoc"></a>'); tabLoc = $('<a class="tabLoc"></a>');
$article.prepend(tabLoc); $article.prepend(tabLoc);
} }
tabLoc.focus(); tabLoc.focus();