Skip to content
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]: ModalPopup doesn't close on button click on mobile devices #3081

Closed
ihor-romaniuk opened this issue May 28, 2024 · 1 comment · Fixed by #3087
Closed

[bug]: ModalPopup doesn't close on button click on mobile devices #3081

ihor-romaniuk opened this issue May 28, 2024 · 1 comment · Fixed by #3087
Labels
bug Report of or fix for something that isn't working as intended

Comments

@ihor-romaniuk
Copy link
Contributor

Components: ModalPopup

Feedback summary

When you try to close an open ModalPopup modal for mobile devices, the closing does not occur, but 2 events are executed: close event and open event. Which makes it impossible to close the modal by clicking on the call button.
Note: this error does not occur for the desktop version.

2024-05-28.09.37.02.mov

Improvements

The modal should both open and close by clicking on the call button for desktop and mobile devices.

@ihor-romaniuk ihor-romaniuk added the bug Report of or fix for something that isn't working as intended label May 28, 2024
@brian-smith-tcril
Copy link
Contributor

This seems to be an issue with how we're using react-focus-on, and is something others have run into as well theKashey/react-focus-on#33.

The react-focus-on readme has

[onClickOutside] - on click outside of "focus" area. (actually on any event "outside")

In our use case, this means onClickOutside is calling onClose when it receives a touchstart event, but the button doesn't do anything until it recieves a react click event, which happens afterwards during the same press.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants