-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
preventDefault for the un-zoom button #746
Comments
@kayvaninvemo do you have time to put an example into a CodeSandbox that I can test with? |
@kayvaninvemo I unfortunately don't yet understand what the problem is. If you can help me understand it with a demo, that would be helpful. |
try here: https://stackblitz.com/edit/vitejs-vite-nddcft?file=src%2FApp.tsx
|
@tjx666 @kayvaninvemo Got it! Will fix. Many thanks for y'all's patience and sharing info. |
Well, I thought this would be fixed in Could one of y'all give this a try for me? It's not impossible |
If zoom is used for an image inside the dialog. When unzoomed it closes the dialog too. |
@djaffer This was not the case for me when I tested with a plain dialog element. Are you also using |
Yes. I fixed by using @kayvaninvemo answer. Thanks to him. |
react-medium-image-zoom/source/Controlled.tsx
Line 260 in 4ad2a9c
here we need to preventDefault, otherwise it causes un expected behaviour if the zoom component it self is inside a dialog.
The text was updated successfully, but these errors were encountered: