-
Notifications
You must be signed in to change notification settings - Fork 811
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
Android back button support and a new web platform feature proposal #875
Comments
Hi @domenic,
react-modal could handle this like it handles the |
Oh, very interesting! The way we designed the Do you think your users would specifically want the ability to control each of these independently, with separate properties like you describe? Our thinking was that bundling them together would give users a more expected behavior. |
It would be nice to provide an API where users could also receive the It wouldn't be easy to find a proper API, because we'll need to provide the fallback in case we don't have the watcher. I'll try to have a better look on API side to find more options... |
Should this use case be any different than |
It seems the |
Also, there are 2 events of interest: |
I'm going to close this because this feature is yet experimental. Thank you all for your considerations. |
Could be implemented under an I mean, I believe it's experimental exactly so it can gather feedback from real-world usage (like what would happen in a library such as this one) before stabilizing the API, no? Maybe @domenic can advise. |
I'd prefer a branch to test it, instead of push and maintain compiler flags. |
I wonder if a branch would be harder to maintain compared to a flag. Because the flag is like literally Well... I wonder if even a flag is really needed to be honest. It's just progressive enhancement. And if the CloseWatcher API is removed for some reason in the future, it's just graceful degradation. |
The branch is just for a POC. |
Hi react-modal maintainers,
The Chrome team is investigating how to make modals on the web better. One area we've identified is that it's hard for libraries to get the correct behavior on Android of having the back button close a modal. (This can also be an issue on other platforms, e.g. iOS VoiceOver has a special gesture for closing modals.) As such, we have a new proposal at WICG/proposals#18 which is looking for signals of web developer interest, to see if it's worth investing in.
I wasn't able to determine from your issue tracker or your source code if this was something you or your users had run into, so I thought I'd open a new issue to get your feedback. Is this problem something your library is interested in? If so, do you have any thoughts on the proposed API? It's actually partially implemented in Chrome behind a flag (with the old name
ModalCloseWatcher
), so you could try it out.Best,
-Domenic
The text was updated successfully, but these errors were encountered: