mirror of
https://github.com/frappe/books.git
synced 2025-01-24 15:48:25 +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]);
|
await this.selectItem(this.items[0]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
highlightItemUp() {
|
highlightItemUp(e) {
|
||||||
|
e?.preventDefault();
|
||||||
|
|
||||||
this.highlightedIndex -= 1;
|
this.highlightedIndex -= 1;
|
||||||
if (this.highlightedIndex < 0) {
|
if (this.highlightedIndex < 0) {
|
||||||
this.highlightedIndex = 0;
|
this.highlightedIndex = 0;
|
||||||
@ -227,7 +229,9 @@ export default {
|
|||||||
this.scrollToHighlighted();
|
this.scrollToHighlighted();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
highlightItemDown() {
|
highlightItemDown(e) {
|
||||||
|
e?.preventDefault();
|
||||||
|
|
||||||
this.highlightedIndex += 1;
|
this.highlightedIndex += 1;
|
||||||
if (this.highlightedIndex > this.items.length) {
|
if (this.highlightedIndex > this.items.length) {
|
||||||
this.highlightedIndex = this.items.length;
|
this.highlightedIndex = this.items.length;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user