-
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
Clicking the trigger button when the menu is open does not close the menu on Safari and Firefox #832
Comments
we need to look into this. |
|
if (
event.relatedTarget !== toggleButtonRef.current &&
// https://github.com/downshift-js/downshift/issues/832 - workaround for Firefox.
!(
event.nativeEvent &&
(toggleButtonRef.current === event.nativeEvent.explicitOriginalTarget ||
toggleButtonRef.current.contains(
event.nativeEvent.explicitOriginalTarget,
))
)
) { This should fix Firefox. I could not find something for Safari so far. |
Reopen it for Safari. |
#837 breaks In particular, |
|
chore: refactor and improve hooks code and tests Contains refactoring, test improvements, bug fixes. BREAKING CHANGE: Removed `FunctionClearKeysSoFar` from state change types and TS typings. In useSelect, once the timeout for keeping the character keys in memory has expired, `FunctionSetInputValue` will be used. We are doing this as we are renaming `keysSoFar` with `inputValue`. To migrate to the new change, simply check for `FunctionSetInputValue` with empty string as `inputValue` instead of checking for `FunctionClearKeysSoFar` in `stateReducer`. BREAKING CHANGE: Both `getA11yStatusMessage` and `getA11ySelectionMessage` will be called with the same props as the `getA11yStatusMessage` in `<Downshift>`, apart from `previousResultCount`. In the TS typings it's now marked as optional, and all functions have the same interface definition, `A11yStatusMessageOptions`. To migrate to the new changes, in `useSelect` and `useCombobox`, if you used `items` as parameters in any of the a11y message functions, now you should use `resultCount` as probably you only needed `items.length` from it anyway. Also typings `UseSelectA11yMessageOptions` and `UseComboboxA11yMessageOptions` have been removed. Use `A11yStatusMessageOptions` instead. Code Changes: tests have been enhanced by using `user input` from `RTL` and they now look better and cleaner. Also covered more use cases better. Code has been refactored as well, and bundle size slightly reduced. Functional Improvement: better focus management for both `useSelect` and `useCombobox`. Fixes #832. Closes #892 Closes #891 Closes #873
🎉 This issue has been resolved in version 5.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This appears to be broken again in version 5.4.5 of Downshift. I'm noticing the issue both in my code as well as the example on the |
downshift
version: 3.4.2node
version: n/anpm
(oryarn
) version: n/aRelevant code or config
https://codesandbox.io/s/53qfj (the example in the repo)
What happened:
Problem description:
Clicking the trigger button when the menu is open does not close the menu on Safari and Firefox
Suggested solution:
Unsure if this is expected behavior with those two browsers or if this is something that should be addressed.
The text was updated successfully, but these errors were encountered: