-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] - Button: onPress prop not being invoked on Mouse Events when Select Popover is open #1680
Comments
Following this issue |
I have the same issue. When I click on Select it opens, but when I click on Select itself, it doesn't close the popover. Surprisingly this is working fine on the NextUI document page! Any updates on this? |
@ahmadbafrani this has been fixed in canary branch. It will be available in the next release, which will be taken place later today. |
@wingkwong , @ahmadbafrani kindly close it as #completed |
@abhinandan-verma my comment was only for his case only, not for the original issue posted here. Need to double check if it is still reproducible or not. |
I have the same problem with the autocomplete. I have a contact list with autocomplete, when the search yields no results through emptyContent I display a button that when clicked opens the modal object and should close the autocomplete list. The modal opens but the list remains open and visible on the layer of the modal.
|
NextUI Version
2.1.13
Describe the bug
In this example of the
Select
component, the onPress prop on the Button component is not acting as expected. Pressing (Key down or mouse click) opens the select popover but then only a Key down action can close the select component, clicking doesn't work.Using a native button element (btn in my example) with the onClick prop works as expected but the props on the Button component are not able to achieve consistent behavior across Mouse and Keyboard.
I have created a basic demo setup from scratch in the video below.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Expected behavior
The expected behavior when the select popover is open, and you click on the button again to toggle the open state, is for the popover to close.
What happens is that the select popover doesn't close on clicking the button.
Screenshots or Videos
next-ui-select-bug.mp4
Operating System Version
Linux (Ubuntu 22)
Browser
Chrome
The text was updated successfully, but these errors were encountered: