summaryrefslogtreecommitdiffstats
path: root/js/gui/KeyboardShortcuts.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/gui/KeyboardShortcuts.js')
-rw-r--r--js/gui/KeyboardShortcuts.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/gui/KeyboardShortcuts.js b/js/gui/KeyboardShortcuts.js
index 1b3b05976..ffa5d88a9 100644
--- a/js/gui/KeyboardShortcuts.js
+++ b/js/gui/KeyboardShortcuts.js
@@ -298,7 +298,12 @@
items.each(function (index, item) {
item = $(item);
- if (item.position().top > 1) {
+ // special treatment for items that have expand enabled:
+ // if you click next and the first item has not been expaned and
+ // is on the top, it should be expanded instead of the next one
+ if ((item.position().top === 0 && expandItemInCompact &&
+ !item.hasClass('open')) ||
+ item.position().top > 1) {
scrollToItem(scrollArea, item, expandItemInCompact);
jumped = true;