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

Updated event registration to fix no scrolling on mobile and event registration failure if jQuery not loaded. #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MatthewBacalakis
Copy link

Fixing two issues related to event registration.

  1. Events were not being registered if full jQuery not loaded. Added check to use addEventListener if jQuery not loaded. Note that along with this change I've found that pull request fixes error with touch events due to jquery wrapping original event #32 is also required for touch events to work.
  2. On mobile once an image was loaded the whole page could no longer be scrolled. Moved touchmove and touchend events from window to canvas.

@MatthewBacalakis MatthewBacalakis changed the title Mobile freeze fix Updated event registration to fix freezing on mobile and event failure if jQuery not loaded. Apr 15, 2016
@MatthewBacalakis MatthewBacalakis changed the title Updated event registration to fix freezing on mobile and event failure if jQuery not loaded. Updated event registration to fix no scrolling on mobile and event failure if jQuery not loaded. Apr 15, 2016
@MatthewBacalakis MatthewBacalakis changed the title Updated event registration to fix no scrolling on mobile and event failure if jQuery not loaded. Updated event registration to fix no scrolling on mobile and event registration failure if jQuery not loaded. Apr 15, 2016
@WillyMichel
Copy link

@MatthewBacalakis Thank you for this solution. It solves the original problem. But now that I can scroll on the page on mobile device, I can no longer interact with the cropper, it's here and loaded, but can't move the crop section inside canvas nor resize the crop section. Any tips to solve this new problem ?

@MatthewBacalakis
Copy link
Author

I have noticed this happen sporadically even before my changes. It seems to be related to the size of the cropper. It doesn't happen for me when I give the cropper a specific size well smaller then the dimensions of the containing page.

@WillyMichel
Copy link

Yes that's it. To solve this I used de specific size on the cropper and I also had to do the pull request #32. I thought it was in your pull request too, so I did not do it.
Thanks a lot for your help !

@MatthewBacalakis
Copy link
Author

Great! Glad it helped and sorry for the confusion!

@jerodb
Copy link

jerodb commented Dec 6, 2016

Thank you @MatthewBacalakis, your solution works great!

Copy link

@adamnolte adamnolte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed my problem! Thanks!

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

Successfully merging this pull request may close these issues.

4 participants