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

Autocomplete ignores "Enter" key events #5348

Closed
taylorham opened this issue Nov 29, 2023 · 1 comment
Closed

Autocomplete ignores "Enter" key events #5348

taylorham opened this issue Nov 29, 2023 · 1 comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@taylorham
Copy link

What package has an issue?

@mantine/core

Describe the bug

Keyboard events for the Enter key seem to be getting swallowed silently somewhere.

I just upgraded a search bar I'd made in v6 to v7 and lost the functionality I used to have. Attempting to submit a value that doesn't match any data option is impossible without another element or event, and even selecting a data option now requires an arrow key or mouse click rather than Enter completing the selection.

What version of @mantine/* packages do you have in package.json? (Note that all @mantine/* packages must have the same version in order to work correctly)

7.2.2

If possible, please include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/condescending-sanderson-d9ng96

Do you know how to fix the issue

No

Do you want to send a pull request with a fix?

Yes

Possible fix

I assumed this was coming from a preventDefault() in one of the handlers for the "Enter" key, but the only instance I could find was in use-combobox-target-props.js and all efforts to fix it locally have been in vain.

The ctx.store.dropdownOpened condition fires every time, regardless of whether or not the dropdown is opened or an option is selected. I'd love to contribute if anyone can help me narrow down the root cause!

rtivital added a commit that referenced this issue Dec 4, 2023
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Dec 4, 2023
@rtivital
Copy link
Member

rtivital commented Dec 7, 2023

Fixed in 7.3.1

@rtivital rtivital closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants