mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
Change all keyup events to keydown (#935)
For a few reasons: - event.preventDefault() for the Enter key (to stop it from submitting the form when you select an item) is only effective if it's a keydown event. - Using keydown for up/down navigation means you can hold them down to rapidly scroll through a lot of items. - Keydown events make the UX feel more responsive, and is consistent with how most apps/operating systems handle key presses.
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ export const searchSubmit = (Wrapper, searchText = false) => {
|
||||
if (searchText) {
|
||||
Wrapper.vm.search = searchText;
|
||||
}
|
||||
Wrapper.find({ ref: "search" }).trigger("keyup.enter")
|
||||
Wrapper.find({ ref: "search" }).trigger("keydown.enter")
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user