mirror of
https://github.com/frappe/books.git
synced 2025-01-09 17:53:56 +00:00
fix: prevent wonky dropdown key scrolling
This commit is contained in:
parent
544eb5128d
commit
3edc050cfb
@ -214,7 +214,9 @@ export default {
|
||||
await this.selectItem(this.items[0]);
|
||||
}
|
||||
},
|
||||
highlightItemUp() {
|
||||
highlightItemUp(e) {
|
||||
e?.preventDefault();
|
||||
|
||||
this.highlightedIndex -= 1;
|
||||
if (this.highlightedIndex < 0) {
|
||||
this.highlightedIndex = 0;
|
||||
@ -227,7 +229,9 @@ export default {
|
||||
this.scrollToHighlighted();
|
||||
});
|
||||
},
|
||||
highlightItemDown() {
|
||||
highlightItemDown(e) {
|
||||
e?.preventDefault();
|
||||
|
||||
this.highlightedIndex += 1;
|
||||
if (this.highlightedIndex > this.items.length) {
|
||||
this.highlightedIndex = this.items.length;
|
||||
|
Loading…
Reference in New Issue
Block a user