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

jQuery 3 is not compatible with this script #251

Open
adantart opened this issue Jun 7, 2017 · 11 comments
Open

jQuery 3 is not compatible with this script #251

adantart opened this issue Jun 7, 2017 · 11 comments

Comments

@adantart
Copy link

adantart commented Jun 7, 2017

It does not load the image and returns a push function error/warning notification

@ghost
Copy link

ghost commented Jun 12, 2017

I am getting the same issue
cannot read property 'push' of undefined

@kimulisiraj
Copy link

It works fine If You can comment out.
// if (this.options.allowDragNDrop) { // _jquery2['default'].event.props.push('dataTransfer'); // }
This disables drag and drop

@mohandes
Copy link

why developer didn't update cropit for jquery v3?

@rsbondi
Copy link

rsbondi commented Jul 5, 2017

#242 seems to work for me, I pointed to the rawgit of this commit and works with old and new version of jquery, at least in my use case

@FahriDevZ
Copy link

In jQuery 3 add event like this

jQuery.event.addProp('dataTransfer')

@kpmdevgr
Copy link

kpmdevgr commented Nov 5, 2017

Also you can solve it by adding allowDragNDrop: false in your cropit call.

@fahri5567 where should we add this line jQuery.event.addProp('dataTransfer') ?

@FahriDevZ
Copy link

@kpmdevgr I change this.

if (this.options.allowDragNDrop) {
    $.event.props.push('dataTransfer');
}

to

if (this.options.allowDragNDrop) {
    if ($.event.props.push) { //if can push
        $.event.props.push('dataTransfer');
    }
    else {
        $.event.addProp('dataTransfer');
    }
}

and build.

But i have problem build cropit with webpack.
the problem Error: Cannot find module './Zoomer', because in the file name not Zoomer.js but is zoomer.js.
I change import Zoomer from './Zoomer'; to import Zoomer from './zoomer';.
and build.

@angelogeminiani
Copy link

Is this script still maintained?
jQuery 3 compatibility is a must.
Does any one created a side project?

@kpmdevgr
Copy link

@angelogeminiani i am using it in two web projects with jquery 3, and the only thing i had to change was the drag and drop to be disabled!

@ssantanuberaa
Copy link

I have had the same issue..
But disabling drag and drop works.

$('.image-editor').cropit({
    allowDragNDrop: false
});

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

9 participants