Opened 13 years ago
Closed 10 years ago
#5949 closed bug (notabug)
Sortable: option handle is broken, fix proposed
Reported by: | jnelson | Owned by: | jnelson |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.sortable | Version: | 1.8.4 |
Keywords: | handle | Cc: | [email protected]… |
Blocked by: | Blocking: |
Description
The handle option is described (as of today at http://jqueryui.com/demos/sortable/#option-grid ) as "Restricts sort start click to the specified element." It doesn't work here ( Firefox 3.6.6, only targeting Ff 3.6+ so only browser tested ); sort start click is not restricted at all.
Line 112 of jquery.ui.sortable:
$(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
I think currentItem should be excluded from the search; if I understand, this test as written will *always* match. Initial tests with currentItem removed cause the handle option to work as I would expect.
Submitting pull request.
Change History (5)
comment:1 Changed 13 years ago by
comment:2 Changed 10 years ago by
Milestone: | TBD → 2.0.0 |
---|
comment:3 follow-up: 4 Changed 10 years ago by
Owner: | set to jnelson |
---|---|
Status: | new → pending |
Summary: | option handle is broken, fix proposed → Sortable: option handle is broken, fix proposed |
Thanks for taking the time to contribute to the jQuery UI project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket. I have attempted to recreate the problem and have been unable to: http://jsfiddle.net/petersendidit/jguXU/1/
Additionally, be sure to test against the git version of both jQuery UI and jQuery to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/ZgAqH/Open the link and click to "Fork" (in the top menu) to get started.
comment:4 Changed 10 years ago by
Status: | pending → new |
---|
petersendidit's test case (thanks!) shows that this bug is not valid as reported*, even in Firefox 3.6.6 / WinXP. Recommend close. Thanks!
- As usual, original context more complex; original "simplified" tests - not as simple as the jsfiddle above - are no longer available.
comment:5 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Attempted fix at http://github.com/jnelson/jquery-ui/commit/a8125ce04fc0a5bd50a4e77d37a772166aa2ab91