[sortable] drag nested items with parent "locked"
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to lock parent elements on the sortable component but leave the children to be sortable?
For instance: https://jsfiddle.net/5mvLfw74/
I would like to sort items 11 and 12 but looks like since the parent is on the cancel selector the whole "tree" is locked.
For what i see the issue might be coming from https://github.com/jquery/jquery-ui/blob/70dae67b73dfea9126f126f516fe8286f1e73417/ui/widgets/mouse.js#L98
Looks like the closest element that matches the cancel selector is the parent and then the mouse event is not triggered
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the nested sortable behavior from the linked JSFiddle, then inspect the sortable component and the referenced ui/widgets/mouse.js line 98 where the cancel selector is checked. The fix is done when a locked parent prevents its own dragging while nested children such as items 11 and 12 remain sortable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100