Opened 9 years ago

Closed 7 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: jnelson@…
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:2 Changed 7 years ago by Scott González

Milestone: TBD2.0.0

comment:3 Changed 7 years ago by petersendidit

Owner: set to jnelson
Status: newpending
Summary: option handle is broken, fix proposedSortable: 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 in reply to:  3 Changed 7 years ago by jnelson

Status: pendingnew

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 7 years ago by mikesherov

Resolution: notabug
Status: newclosed
Note: See TracTickets for help on using tickets.