Hi
My settings:
css aggregation on
custom form with image:
instant crop and instant preview on
inline crop off (i use an overlay)
Problem: Sometimes after image upload, the preview is too big and covers part of the image to crop (screen attached).
Reason:
manualcrop.js and manualcrop.css files are being attached to site just after image upload (function _manualcrop_attach_files in manualcrop.helpers.inc). manualcrop.js may execute before css is fully loaded and since it calculates images dimensions basing on css, it goes wrong.
After site refresh everything works fine - css file is in browser cache.
Temporary solution: I copied manualcrop.css styles to my styles so they are always available for js - no problem anymore.
But there should be some checking for css existence in js file
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | manualcrop-instant_crop-2429395-1.patch | 2.7 KB | sgurlt |
| manualcrop-bug.jpg | 240.12 KB | matysek145 |
Comments
Comment #1
sgurlt commentedI ran into the same issue and wrote a little patch for it. Please review and let me know what you think.
Comment #2
sgurlt commentedComment #3
matysek145 commentedUnfortunately doesn't work for me. I patched files and removed css that i had copied before, but after every browser cache clearing i still have the issue.
Comment #4
sgurlt commentedHmm thats strange, did you patch against latest dev release?
Comment #5
matysek145 commentedHi, i patched against 7.1.4+121 dev release and didn't work (i believe it must have been some of the newest release, but i can't find information about the release day of this version :x).
When i tried to patch the latest one (7.15+0 dev) i couldn't do this beacuse of some fails
Anyway i tried to patch 7.14+121 dev again, but with the same results as before