Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter keyboard events by type to ignore autocompletion #4291

Merged
merged 1 commit into from
Feb 1, 2025
Merged

Conversation

falkoschindler
Copy link
Contributor

This PR solves #4290 by ignoring keyboard events that are not of type KeyboardEvent.

It can be tested with the following snippet by picking an email from the dropdown list:

ui.keyboard(ui.notify, ignore=[])
ui.input('email').props('autocomplete=email')

Without this PR, the autocompletion triggers a keyboard event, causing an exception due to missing attributes.
With this PR there is simply no keyboard event in this case.

@falkoschindler falkoschindler added the bug Something isn't working label Jan 31, 2025
@falkoschindler falkoschindler added this to the 2.11 milestone Jan 31, 2025
@falkoschindler falkoschindler requested a review from rodja January 31, 2025 07:08
@falkoschindler falkoschindler linked an issue Jan 31, 2025 that may be closed by this pull request
@rodja rodja merged commit 7a540bf into main Feb 1, 2025
9 checks passed
@rodja rodja deleted the keyboard-events branch February 1, 2025 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with ui.keyboard when autocomplete on input.
2 participants