Skip to content

Commit c58ee8c

Browse files
committed
Update codeit-autocomplete.js
1 parent 35c54dc commit c58ee8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/plugins/codeit-autocomplete.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ function handleMenuKeydown(e) {
229229

230230
const selIconPos = next.getBoundingClientRect().top - suggestions.getBoundingClientRect().top - 1;
231231

232-
if (selIconPos > 224) {
233-
suggestions.scrollTop += 28;
232+
if (selIconPos > 140) {
233+
suggestions.scrollTop += next.clientHeight;
234234
}
235235

236236
}
@@ -264,7 +264,7 @@ function handleMenuKeydown(e) {
264264
const selIconPos = prev.getBoundingClientRect().top - suggestions.getBoundingClientRect().top;
265265

266266
if (selIconPos < 0) {
267-
suggestions.scrollTop -= 28;
267+
suggestions.scrollTop -= prev.clientHeight;
268268
}
269269

270270
}

0 commit comments

Comments
 (0)