mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 21:43:15 +08:00
BUGFIX: fix ~ and ` navigation
Was completely broken.
This commit is contained in:
parent
96f3ced4f9
commit
cbb2cc3911
|
@ -231,9 +231,12 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
|
|||
},
|
||||
|
||||
_changeSection: function(direction) {
|
||||
var $sections = $('#navigation-bar').find('li'),
|
||||
index = $sections.index('.active');
|
||||
var $sections = $('#navigation-bar li'),
|
||||
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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user