Fixed Avatar upload: Cannot "drag this image to crop it" on Android or iOS

Steffen

Well-known member
Affected version
2.0.7
After uploading an avatar image, I can "drag this image to crop it" on desktop browsers but the image is undraggable on Android (Chrome 67) and iOS (I'm only able to test this on iOS 9 but I guess that the user who reported this to us is using a current iOS version).

I've verified that the issue exists here on xenforo.com, too. (On xenforo.com I've only tested with Android.)
 
That's annoying; it used to work. It was one of the main reasons we used the little cropbox library we use here - it supports touch events whereas our previous one (in 1.x) didn't.
 
This should be sorted now for the next release. You can test it out here. We're just including Hammer.js in the avatar-compiled.js file so it's only loaded when needed.
 
@Chris D hammer.js throws an exception if it is loaded in a device without touch support (which breaks jquery.cropbox.js). How do you intend to work around that?
 
Worked fine in my testing on a non touch device earlier.

If you can provide more detail, we’ll have a better chance of confirming and working around the issue.
 
This line throws;
https://github.com/hammerjs/hammer.js/blob/563b5b1e4bfbb5796798dd286cd57b7c56f1eb9e/hammer.js#L2886
calling;
https://github.com/hammerjs/hammer....96798dd286cd57b7c56f1eb9e/hammer.js#L353-L357

In Chrome on my Win10 desktop this is throwing when I build a copy of hammer+cropbox for Threadmark's icon functionality. If I inject a hammer.js reference into the avatar upload HTML I get the same issue.

Issue reported here by someone else; https://github.com/hammerjs/hammer.js/issues/1131 for me this page errors; https://cdn.rawgit.com/hammerjs/hammer.js/master/tests/manual/touchaction.html

1535259209487.webp

Also reports of this on the jquery.cropbox.js side; https://github.com/acornejo/jquery-cropbox/issues/60
 
Last edited:
Back
Top Bottom