-
Notifications
You must be signed in to change notification settings - Fork 231
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
Modal window closes unexpectedly when 'mousedown' IN the modal and 'mouseup' on the background #287
Comments
+1 for this issue. Honestly, is there modal lib that gets that right? Its really annoying if there is form in the modal, users often click form inputs and release mouse button outside modal which closes it! |
Duplicate of #216 Worth mentioning that as a workaround you can disable clicking outside the modal to close by removing the I.e. change this: <div class="modal__overlay" tabindex="-1" data-micromodal-close> To this: <div class="modal__overlay" tabindex="-1"> |
Also my 2 cents regarding the suggested fix of using the So possibly this means that the overlay should have a new Happy to make a PR if that's useful. |
@PeterDekkers yeah, removing data-micromodal-close is the solution sometimes, but I usually need that functionality too. mousedown - probably, but it should be tested on mobile and other touch devices too |
Yes indeed @DimaGashko, good point about touch devices. |
Any update on the status of this issue? Look like the close trigger is still shared among the close button and modal overlay. |
Hello folks! Please send PR if possible and @ghosh or I can merge it. |
If anyone has time to make a PR for this, I'd be happy to review it. Otherwise, I'll get to it when I can. |
Here's a video: https://drive.google.com/file/d/150mGwQNYmXyfykiVVdkw1VhCKvBhfQ96/view
This is small but really annoying issue!
p.s. the easiest solution is replace 'click' event by 'mousedown' (probably)
The text was updated successfully, but these errors were encountered: