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

parentSelector to have Cropper working inside iframe #39

Open
matteofrana opened this issue Aug 14, 2023 · 2 comments
Open

parentSelector to have Cropper working inside iframe #39

matteofrana opened this issue Aug 14, 2023 · 2 comments

Comments

@matteofrana
Copy link

matteofrana commented Aug 14, 2023

Hi!
I have a modal (react-modal) attached to a parent iframe (via parentSelector).
Inside this modal I have the Cropper. The wheel event is working, while the cropping handles aren't working.
I think it is because the Cropper attaches events to the current window, while I should have them attached to the iframe document:

window.addEventListener('touchmove', this.onTouchMove, { passive: false });

I think this could be done by adding a parentSelector prop to the Cropper component and, if there is a parentSelector, attaching the events to it, instead of window.

What do you think about it?

@matteofrana
Copy link
Author

Or maybe it is possible to add the event listener to the container instead of window?

@Norserium
Copy link
Collaborator

@matteofrana, if this issue is still actual, could you provide the minimum reproducible example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants