summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/components/discussion_keyboard_navigator.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/notes/components/discussion_keyboard_navigator.vue')
-rw-r--r--app/assets/javascripts/notes/components/discussion_keyboard_navigator.vue14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/javascripts/notes/components/discussion_keyboard_navigator.vue b/app/assets/javascripts/notes/components/discussion_keyboard_navigator.vue
index 7fbfe8eebb2..7d742fbfeee 100644
--- a/app/assets/javascripts/notes/components/discussion_keyboard_navigator.vue
+++ b/app/assets/javascripts/notes/components/discussion_keyboard_navigator.vue
@@ -19,7 +19,11 @@ export default {
};
},
computed: {
- ...mapGetters(['nextUnresolvedDiscussionId', 'previousUnresolvedDiscussionId']),
+ ...mapGetters([
+ 'nextUnresolvedDiscussionId',
+ 'previousUnresolvedDiscussionId',
+ 'getDiscussion',
+ ]),
},
mounted() {
Mousetrap.bind('n', () => this.jumpToNextDiscussion());
@@ -33,14 +37,14 @@ export default {
...mapActions(['expandDiscussion']),
jumpToNextDiscussion() {
const nextId = this.nextUnresolvedDiscussionId(this.currentDiscussionId, this.isDiffView);
-
- this.jumpToDiscussion(nextId);
+ const nextDiscussion = this.getDiscussion(nextId);
+ this.jumpToDiscussion(nextDiscussion);
this.currentDiscussionId = nextId;
},
jumpToPreviousDiscussion() {
const prevId = this.previousUnresolvedDiscussionId(this.currentDiscussionId, this.isDiffView);
-
- this.jumpToDiscussion(prevId);
+ const prevDiscussion = this.getDiscussion(prevId);
+ this.jumpToDiscussion(prevDiscussion);
this.currentDiscussionId = prevId;
},
},