mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-25 01:32:21 +02:00
Moving cursor to input text when pressing on filter
This commit is contained in:
parent
fa5232a704
commit
1cbe24b8c7
@ -115,6 +115,10 @@ export default class PokedexScanUiHandler extends FormModalUiHandler {
|
||||
|
||||
this.reduceKeys();
|
||||
|
||||
setTimeout(() => {
|
||||
input.setFocus(); // Focus after a short delay to avoid unwanted input
|
||||
}, 50);
|
||||
|
||||
input.on("keydown", (inputObject, evt: KeyboardEvent) => {
|
||||
if ([ "escape", "space" ].some((v) => v === evt.key.toLowerCase() || v === evt.code.toLowerCase()) && ui.getMode() === Mode.AUTO_COMPLETE) {
|
||||
// Delete autocomplete list and recovery focus.
|
||||
|
Loading…
Reference in New Issue
Block a user