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

Problems when one of the lists is empty #18

Closed
msurguy opened this issue Feb 22, 2014 · 9 comments
Closed

Problems when one of the lists is empty #18

msurguy opened this issue Feb 22, 2014 · 9 comments

Comments

@msurguy
Copy link

msurguy commented Feb 22, 2014

Hi!

This is a great sorting script, I am enjoying the efficiency so far.

One problem I've run into is when I start out with one of the groups being empty. For example if I want to add items from one list to another and the second list is empty, I am able to only move one item and after that the script just quietly stops functioning for some reason.

No errors are displayed so I don't understand what the problem is.

Here's a JS fiddle with the scenario I'm talking about (the second group is empty at start): http://jsfiddle.net/msurguy/tQ6FL/

@dardinweb
Copy link

Hi,

I have exactly the same problem.
Good job for this script.

@RubaXa
Copy link
Collaborator

RubaXa commented Feb 23, 2014

Yes, strange problem try to solve it for this week.

@RubaXa
Copy link
Collaborator

RubaXa commented Feb 23, 2014

The problem arises if you do not specify an option draggable.
http://jsfiddle.net/tQ6FL/3/

RubaXa added a commit that referenced this issue Feb 23, 2014
@dardinweb
Copy link

It's good! thank you.

@msurguy
Copy link
Author

msurguy commented Feb 25, 2014

specifying the draggable option fixed the problem for me too. Thank you!

@msurguy msurguy closed this as completed Feb 25, 2014
NeosinneR added a commit to twobits-cz/Sortable that referenced this issue May 13, 2014
…wobits

* commit '008b9cd96d346906ab5cdd8cf0a1b1f1b01b28e4':
  SortableJS#44: Support SVG
  Disable 'draggable' attribute on drop.
  Add component config
  * fixed SortableJS#28
  SortableJS#26: + supportIEdnd
  SortableJS#24: + _ghostInBottom
  v0.1.7: * draggable (SortableJS#18)
  unbind all element events on destroy
  Added CommonJS support
  Adding IE9 support for draggable elements that are not <a> or <img>
  updating version to 0.1.6
  0.1.6
  forcing removal of draggable attribute on destroy
  SortableJS#11: + can i use...

Conflicts:
	Sortable.js
@chrizz1001
Copy link

Hi!
First of all: Wonderfull script you did here! Sadly I have to re-open this, as I see the same behavior here.
See my fiddle:
https://jsfiddle.net/dv91ktmh/

As you can see I have set the draggable option as well as the handle option.

Moving Items from one of the source lists to the first list works good. After first sorting action (inside the first list) everything stops working.

I tried both: master and dev branch. Same behavior.

Any hint would be helpfull. Maybe I have some missconfiguration?

@MECLab-Keags
Copy link

@chrizz1001 Did you manage to resolve this issue? I'm also experiencing some strange behaviour when trying to drag between empty lists.

@bozau
Copy link

bozau commented May 14, 2017

@chrizz1001 and @MECLab-Keags I've found that applying a css style of 'min-height' will help allow you to add to empty lists, see the jsfiddle here: https://jsfiddle.net/8e52q8ya/

@Chrescht
Copy link

I solved this by replacing the <ul id="myList"> with a <div id="myList" class="lane">
lane class has min-height: 8rem;

I did not figure out what specifying a "draggable option" means, respectively it didn't work.

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

7 participants