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

dragsort won't initialize if all lists are empty #14

Open
mcm-ham opened this issue Dec 25, 2017 · 1 comment
Open

dragsort won't initialize if all lists are empty #14

mcm-ham opened this issue Dec 25, 2017 · 1 comment

Comments

@mcm-ham
Copy link
Owner

mcm-ham commented Dec 25, 2017

I have 3 lists, initially empty, filled dynamically later.
If I call $(list).dragsort({ dragSelector: '.item' }) when they are empty, nothing happens.
However, if at least one of the is nonempty, all of them get initialized.

This is clearly a bug, either it should initialize either way (preferred) or only for nonempty lists.
Happens in current firefox & chrome, not tested elsewhere.

For the, the workaround of creating the lists with a placeholder item, initializing and then deleting the item works.

This work item was migrated from CodePlex

CodePlex work item ID: '33484'
Vote count: '1'

@mcm-ham
Copy link
Owner Author

mcm-ham commented Dec 25, 2017

[himdel@27/11/2012]
Additional info:

I can actually make it intialize almost fine using$('.orderselect').dragsort({ itemSelector: '.option', dragSelector: '.option', placeHolderTemplate: '' })

But then, dropping doesn't work - the item returns where it was.

If I add$('.orderselect').dragsort({ itemSelector: '.option', dragSelector: '.option', placeHolderTemplate: '' })it works, but weird - an empty option appears while dragging, which I don't want.

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

No branches or pull requests

1 participant