Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

events handling in Sortables #1134

Closed
cyga opened this Issue Jun 19, 2012 · 4 comments

Comments

Projects
None yet
3 participants

cyga commented Jun 19, 2012

Example:
table
We want to sort tr's for it.
Currently events for any underlying not "button","input","a","textarea" won't be handled.
Sometimes it's needed.
Plus if we want to do dragging/sorting only for dragging specific element (for eg: img with draggable pictire), we have no way to achieve this.

Implemented easily with:

start:function(b,a){if(!this.idle||b.rightClick||["button","input","a","textarea"].contains(b.target.get("tag"))||(this.options.startCheck&&!(this.options.startCheck(b,a)))){return;}
...

It's start function for Sortables.

Please add this code.

what about:

options:
    ...
    allowEvents: ['button', 'input', 'a', 'textarea', 'select'],
    ...

start: function(event, element){
    if (
        !this.idle ||
        event.rightClick ||
        this.options.allowEvents.contains(event.target.get('tag'))
    ) return;

Owner

arian commented Aug 22, 2012

This was fixed in #1136

@arian arian closed this Aug 22, 2012

Sorry, thanks!

This was fixed in #1136


Reply to this email directly or view it on GitHub:
#1134 (comment)

Owner

arian commented Aug 22, 2012

no thank you, for reminding us to close this ;)

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