Skip to main content

Search and Top Navigation

#5949 closed bug (notabug)

Opened August 13, 2010 08:43PM UTC

Closed November 03, 2012 11:19PM UTC

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@eds.org
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.

Attachments (0)
Change History (5)

Changed August 13, 2010 08:50PM UTC by jnelson comment:1

Changed October 11, 2012 09:07PM UTC by scottgonzalez comment:2

milestone: TBD2.0.0

Changed November 03, 2012 05:31PM UTC by petersendidit comment:3

owner: → 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.

Changed November 03, 2012 09:14PM UTC by jnelson comment:4

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.

Changed November 03, 2012 11:19PM UTC by mikesherov comment:5

resolution: → notabug
status: newclosed