Skip to main content

Search and Top Navigation

#7544 closed bug (fixed)

Opened July 12, 2011 07:39PM UTC

Closed August 01, 2011 06:18PM UTC

When event propagation is stopped, all future mousedown events are improperly considered to be 'handled'

Reported by: brettkiefer Owned by:
Priority: blocker Milestone: 1.8.15
Component: ui.mouse Version: 1.8.14
Keywords: Cc:
Blocked by: Blocking:
Description

In jQuery UI 1.8.14, the jquery.ui.mouse is considering events to be 'already handled' until the top-level document receives a mousedown event, so if any intermediate element stops propagation of the event (a perfectly legitimate thing to do, as I understand it), jQuery UI will consider all mousedown events to be already handled until the user clicks somewhere that allows the event to reach the document.

The issue originates from this change: https://github.com/jquery/jquery-ui/commit/9c50bdfde0260fc8412eec1c5020ed6b61558ebd

This gist illustrates the problem with no dependencies:

https://gist.github.com/1078751

Repro:

1. Load the gist above as a standalone page in a browser (repro'd in Chrome and Firefox)

2. Drag an element

3. Now drag another element

Expected:

Second element also drags

Observed:

After the first drag, you can't drag again until you click off of the sortable lists.

Suggested fix:

In this case I would say that the cure is worse than the disease, since the checkin that caused the issue was to fix a bug that affects nested draggables in IE (#4333), and ui.mouse is a core component that probably shouldn't have this quirk. So I'd say that the checkin above should be reverted and a different approach taken.

Attachments (0)
Change History (4)

Changed July 12, 2011 07:44PM UTC by brettkiefer comment:1

Sorry, missed the jsfiddle preference, here it is in jsfiddle: http://jsfiddle.net/gDzpQ/2/

Changed July 12, 2011 07:45PM UTC by brettkiefer comment:2

Also affects 1.8.13, but not 1.8.12.

Changed August 01, 2011 02:25PM UTC by scottgonzalez comment:3

component: ui.coreui.mouse
milestone: 1.91.8.15
priority: minorblocker
status: newopen

Changed August 01, 2011 06:18PM UTC by scottgonzalez comment:4

resolution: → fixed
status: openclosed

Fixed in master in 350e4ab5b854d2f6aca22d5202c03dcbf59ff4aa

Fixed in 1-8-stable in bd48ddfa94ff673cc5dfef749fe0565f1bc02d0f