Closed
Description
Description
Hello,
I think this is the same error reported here but can't be certain:
#2545
When utilizing autocomplete with ui.input
and concurrently having a ui.keyboard
event tracker active an error is thrown:
Traceback (most recent call last):
File "C:\test\venv\Lib\site-packages\nicegui\events.py", line 430, in handle_event
result = cast(Callable[[EventT], Any], handler)(arguments)
File "C:\test\venv\Lib\site-packages\nicegui\elements\keyboard.py", line 78, in _handle_key
repeat=e.args['repeat'],
~~~~~~^^^^^^^^^^
KeyError: 'repeat'
My test code:
from nicegui import ui
ui.keyboard(ignore=[])
ui.input("email").props('autocomplete="email"')
if __name__ in {"__main__", "__mp_main__"}:
ui.run(port=8080, show=False, reload=False)
To trigger the error just select from an email on the autocomplete list. It appears that the autofill only provides e.args
with a value of {'action': 'keyup'}
and so only action
and no other keys.