jquery / jquery/api.jqueryui.com

Sortable: Marginal event descriptions

Open
#166 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
73
Forks
74
PR merge metrics
No merged PRs in 30d

Description

When i was applying draggable and sortable i discover a difference between the ui.item that is given to the beforeStop and the receive event.

For both the api description is:
"The jQuery object representing the current dragged element."

http://api.jqueryui.com/sortable/#event-receive
http://api.jqueryui.com/sortable/#event-beforeStop

but when i modify ui.item in the receive callback the origin dragged item is modified, but not the dropped item. While i modify the ui.item in the beforeStop event the dropped item changes and not the origin (i my case the lastest was desired).

Is it possible to describe in the documentation bit more elaborated what the ui object is? or what the context is of the callback event.
With this information the differences between the events become more clear imho.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Sortable API entries for the receive and beforeStop events linked in the issue. Compare their descriptions of the ui object and ui.item, then document the callback context and the observed difference between the origin and dropped elements. Done means both event entries clearly explain which dragged element ui.item represents.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.