mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
BUGFIX: fix ~ and ` navigation
Was completely broken.
This commit is contained in:
@@ -231,9 +231,12 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_changeSection: function(direction) {
|
_changeSection: function(direction) {
|
||||||
var $sections = $('#navigation-bar').find('li'),
|
var $sections = $('#navigation-bar li'),
|
||||||
index = $sections.index('.active');
|
active = $('#navigation-bar li.active'),
|
||||||
|
index = $sections.index(active) + direction;
|
||||||
|
|
||||||
$sections.eq(index + direction).find('a').click();
|
if(index >= 0 && index < $sections.length){
|
||||||
|
$sections.eq(index).find('a').click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user