diff --git a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 index 97817f8bd13..000cc335a4c 100644 --- a/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 +++ b/app/assets/javascripts/discourse/lib/keyboard-shortcuts.js.es6 @@ -445,6 +445,9 @@ export default { $selected = $articles .toArray() .find(article => article.getBoundingClientRect().top > offset); + if (!$selected) { + $selected = $articles[$articles.length - 1]; + } direction = 0; }