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

Ghost is broken when using handle. #75

Closed
lukasoppermann opened this issue Dec 26, 2014 · 6 comments · Fixed by #77
Closed

Ghost is broken when using handle. #75

lukasoppermann opened this issue Dec 26, 2014 · 6 comments · Fixed by #77
Labels
feature New feature or enhancement

Comments

@lukasoppermann
Copy link
Owner

When using a handle only the handle item is used as a ghost while it should be the whole item.

You can test it here http://htmlpreview.github.io/?https://github.com/voidberg/html5sortable/blob/master/examples/examples.html

@lukasoppermann
Copy link
Owner Author

I am working on this, I have it fixed, it just needs some cleaning up and docs.

@scien
Copy link

scien commented Jan 9, 2015

any update here?

@lukasoppermann
Copy link
Owner Author

Fix is added, just waiting for a merge of #77.

@lukasoppermann lukasoppermann added feature New feature or enhancement fix labels Apr 28, 2015
@rutger1140
Copy link

Bumped into this as well. My workaround was to remove the handle option in the JS, but leave it in the HTML. The ghosts behaves like it should.

Even though it is possible to drag the entire item, my user tests showed most people use the drag handle icon I created anyway.

@knitevision1
Copy link

@lekkerduidelijk what do you mean by that? Could you expand please?

@rutger1140
Copy link

@knitevision1 Sure. So my code was something like:

// Create sortable list
var $sortlist = $("[data-sortable='true']");
$sortlist.sortable({ handle: ".handle" });
<ul data-sortable="true">
  <li data-item-id="1"><span class="handle"></span> Item 1</li>
  <li data-item-id="2"><span class="handle"></span> Item 2</li>
</ul>

I removed the handle option, so the entire element is draggable. The HTML remains the same.

$sortlist.sortable();

Just don't use the handle in Javascript, only in HTML.

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

Successfully merging a pull request may close this issue.

4 participants