Skip to content

Commit d3042c4

Browse files
committed
Improve scrolling and navigation with keyboard in palette
1 parent cd3dfd7 commit d3042c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/views/commands/palette.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,10 @@ templateFile, commandTemplateFile) {
210210
h = item.$el.outerHeight();
211211
y = item.$el.position().top;
212212

213-
if (y > (boxH-(h/2)) || y < 0) {
213+
if (y > (boxH-(h/2))) {
214214
this.$(".results").scrollTop((i+1)*h - boxH)
215+
} else if (y <= (h/2)) {
216+
this.$(".results").scrollTop((i)*h)
215217
}
216218
}
217219

0 commit comments

Comments
 (0)