-
Notifications
You must be signed in to change notification settings - Fork 932
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
__menu_blur__ fired for unknown reason #1245
Comments
I will take a look and see if I can help figure it out. |
@silviuaavram https://codesandbox.io/s/so-downshift-leaflet-track-the-bug-with-react-select-duk4e |
@NitsanBaleli can you pass the iframe object to Downshift as well? https://www.downshift-js.com/use-select#custom-window for reference. Also check you console errors as well, as it complains that getMenuProps is not called. If you look at any of our examples, the Let me know if this helps. |
@silviuaavram It seems that a focusable element inside the list cannot be clicked. clickable.mp4 |
Will take a look later today. Is there a particular reason you need a focusable element in the list? :-? |
Yes, I have a specification for this type of select (ant-design, https://bit.ly/3vMHW0t): input and button are focusable, I cant get around it -) |
From the design, as you can see, the focus ring is both on the input and on the list item input. it's not possible😁 You could create a separate List Item that can be added on the end of your list, which will be used only to add items. From the design above, just remove that input from the list item, leave + Add item, add text to the top input, and then select the last option to add the item. You can add the new item in the onSelectedItemChange prop. I am pretty sure there are other ways to add items to the original list. My point is that you don't need that design to do it. Which is also impossible to achieve if you want to create a standard accessible combobox element. |
@silviuaavram I really appreciate your time! Im working with it just fine in a normal page. Peek.2021-03-22.17-40.mp4 |
can you provide the link to the latest codesandbox with this issue? we should be able to figure it out. |
Can it be related to #1255 ? |
I spent some time but could not figure this one out. Maybe just don't add the add item button in the menu, I don't know why it's necessary to be in the menu and not somewhere else. Comboboxes and selects have only options in the menu, and downshift encourages you to follow the correct accessibility pattern for each of these. Will close this as I don't think it's relevant anymore, please revise your designs to match the ARIA recommendations. |
my case is a rather special one, since downshift is being used inside a leaflet popup.
problem doesn't appear when component is outside the popup (i.e top of the page)
issue:
above the normal list items i've placed a button (Im trying to make a dedicated 'add item' item in the menu)
that button when first clicked when inside the popup, fires the
__menu_blur__
and closes the menu.the actions are being console logged and I can see the difference between the two components
link: https://codesandbox.io/s/so-downshift-leaflet-track-the-bug-xr638
if this question is out of scope then I apologize sincerely
The text was updated successfully, but these errors were encountered: