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:
parent
ea681d92a2
commit
0d461f16a7
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue