You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a search bar into a menu tag, clicking on it makes the full menu modal disappear.
This is an issue happening on 5.13.1.
On the version5.12.5 we had a similar issue where the dismiss of the modal was fired after clicking on the SearchBar, but we had added a flag to check if the search bar was focused or not and that made the job.
Expected behavior
Clicking on the search bar shall not fire onBlur and not hide the modal at all
How to reproduce?
This is the relevant part of the code, not the full file
I think this is related to a re-render of the component. I have the same issue, that the menu closes when the state of the component (where the Menu is inside of) changes, and therefore the Menu renders again. My workaround was to move the children of the Menu inside of a child component. In your example you would move the Searchbar and the isSearchFocused state inside of the sub-component, so only the sub-component re-renders when changing the state.
I hope this issue will be fixed soon, so this workaround is not required, as it affects a lot of Menu's in our project.
Current behaviour
I have a search bar into a menu tag, clicking on it makes the full menu modal disappear.
This is an issue happening on
5.13.1
.On the version
5.12.5
we had a similar issue where thedismiss
of the modal was fired after clicking on the SearchBar, but we had added a flag to check if the search bar was focused or not and that made the job.Expected behavior
Clicking on the search bar shall not fire
onBlur
and not hide the modal at allHow to reproduce?
This is the relevant part of the code, not the full file
Preview
What have you tried so far?
Trying to prevent the events on blur.
Your Environment
I can reproduce this in my local machine and in the staging server
The text was updated successfully, but these errors were encountered: