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

ImageCropper: broken #4464

Closed
tandraschko opened this Issue Jan 23, 2019 · 15 comments

Comments

Projects
None yet
3 participants
@tandraschko
Copy link
Member

tandraschko commented Jan 23, 2019

@melloware it seems that imageCropper is broken in trunk showcase and firefox. As you updated the plugin, can you check that?

@tandraschko tandraschko added the defect label Jan 23, 2019

@tandraschko tandraschko added this to the 7.0 milestone Jan 23, 2019

@melloware

This comment has been minimized.

Copy link
Contributor

melloware commented Jan 23, 2019

Investigating...

@melloware

This comment has been minimized.

Copy link
Contributor

melloware commented Jan 23, 2019

Hmm I am using Firefox Quantum 64.02 and ImageCropper seems to be working fine for me?

image

@tandraschko

This comment has been minimized.

Copy link
Member Author

tandraschko commented Jan 23, 2019

please try on localhost with trunk

@melloware

This comment has been minimized.

Copy link
Contributor

melloware commented Jan 23, 2019

Hmm localhost with the latest 7.0-SNAPSHOT from this morning is also working fine in Chrome and Firefox for me.

@mertsincan

This comment has been minimized.

Copy link
Member

mertsincan commented Jan 23, 2019

@melloware Please see; https://www.dropbox.com/s/p6m81vxtlgko693/cropper_test.avi?dl=0

After the page refresh, cropper component works fine for me on FF 64.0.2

@tandraschko

This comment has been minimized.

Copy link
Member Author

tandraschko commented Jan 23, 2019

yep, same for me
but it also works only randomly on refresh
maybe is the script initialized to early and "wb.initWithComponentLoad" doesn't work correctly?

@melloware

This comment has been minimized.

Copy link
Contributor

melloware commented Jan 23, 2019

ok interesting let me keep messing with it to try and reproduce.

@mertsincan

This comment has been minimized.

Copy link
Member

mertsincan commented Jan 23, 2019

It works fine for me with "wb.init" instead of "wb.initWithComponentLoad"

@tandraschko

This comment has been minimized.

Copy link
Member Author

tandraschko commented Jan 23, 2019

the problem is that wb.init will be actually be executed on document.ready (before window.load) and therefore the image shoudln't be loaded yet.
initWithComponentLoad actually should be the better solution - maybe also related a bit with MOVE_SCRIPTS_TO_BOTTOM.

@melloware

This comment has been minimized.

Copy link
Contributor

melloware commented Jan 23, 2019

Confirmed. If I change Showcase to MOVE_SCRIPTS_TO_BOTTOM=false it works fine.

@tandraschko

This comment has been minimized.

Copy link
Member Author

tandraschko commented Jan 23, 2019

probably jq "$element.on('load')" doesn't execute the listener when it's already loaded. Is there a jquery solution like "execute listener on load or when already loaded"?

@melloware

This comment has been minimized.

Copy link
Contributor

melloware commented Jan 23, 2019

@tandraschko Am I reading this wrong? It says Load method was deprecated in Jquery 1.8 and removed in 3.0. Are we getting it because we have the migrate script?

https://api.jquery.com/load-event/

@tandraschko

This comment has been minimized.

Copy link
Member Author

tandraschko commented Jan 23, 2019

i think there is a difference between the old-style load method or the .on('load') event

@melloware

This comment has been minimized.

Copy link
Contributor

melloware commented Jan 23, 2019

Hmm that page says "This method is a shortcut for .on( "load", handler )."

tandraschko added a commit that referenced this issue Jan 23, 2019

@melloware

This comment has been minimized.

Copy link
Contributor

melloware commented Jan 23, 2019

Excellent fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment