mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Have keyboard_shortcuts use Discourse.TopicView.jumpToPost
Instead of _scrollList, which is more appropriate on the topic list.
This commit is contained in:
parent
ebb001c24a
commit
19922ff174
1 changed files with 7 additions and 1 deletions
|
@ -127,7 +127,13 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({
|
|||
if ($article.size() > 0) {
|
||||
$articles.removeClass('selected');
|
||||
$article.addClass('selected');
|
||||
this._scrollList($article);
|
||||
|
||||
var rgx = new RegExp("post-cloak-(\\d+)").exec($article.parent()[0].id);
|
||||
if (rgx === null || typeof rgx[1] === 'undefined') {
|
||||
this._scrollList($article);
|
||||
} else {
|
||||
Discourse.TopicView.jumpToPost(rgx[1]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue