BUGFIX: HOME/END keyboard shortcuts on non-topic pages
This make sure both HOME/END keyboard shortcuts are only applied when viewing a topic
This commit is contained in:
parent
bce4130d39
commit
2a99f1b15e
|
@ -59,11 +59,17 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
|
||||||
},
|
},
|
||||||
|
|
||||||
goToFirstPost: function() {
|
goToFirstPost: function() {
|
||||||
Discourse.__container__.lookup('controller:topic').send('jumpTop');
|
this._jumpTo('jumpTop');
|
||||||
},
|
},
|
||||||
|
|
||||||
goToLastPost: function() {
|
goToLastPost: function() {
|
||||||
Discourse.__container__.lookup('controller:topic').send('jumpBottom');
|
this._jumpTo('jumpBottom');
|
||||||
|
},
|
||||||
|
|
||||||
|
_jumpTo: function(direction) {
|
||||||
|
if ($('#topic-title').length) {
|
||||||
|
Discourse.__container__.lookup('controller:topic').send(direction);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
selectDown: function() {
|
selectDown: function() {
|
||||||
|
|
Loading…
Reference in New Issue