Skip to main content

Search and Top Navigation

#7753 closed bug (notabug)

Opened September 30, 2011 04:00PM UTC

Closed October 01, 2011 05:02AM UTC

Last modified October 01, 2011 05:11AM UTC

Fix for nested mouse widgets breaks custom widgets

Reported by: harking Owned by: harking
Priority: minor Milestone: 1.9.0
Component: ui.mouse Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:
Description

#4333 and the related commit use a private variable that can not be modified by sub-widgets of ui.mouse

https://github.com/harking/jquery-ui/commit/a9d71200359621bc55b6dc8127ed2522d5967fe6 adds a getter/setter that is accessable to child plugins.

Attachments (0)
Change History (6)

Changed September 30, 2011 07:50PM UTC by scottgonzalez comment:1

owner: → harking
status: newpending

This ticket doesn't describe a bug at all. Please provide details about the problem you're having.

Changed September 30, 2011 08:19PM UTC by harking comment:2

status: pendingnew

Previous to fix in e15c32d06763afd2376c61642397e7fc98338958 , plugins could check event.originalEvent.mouseHandled to see if the mouse had been handled already, and update it to allow other plugins to run. Now, plugins have no way of looking at this property or changing it.

In my plugin, which is patching ui.selectable to disable the drag-to-select behavior, I needed to set mouseHandled to false so that the ui.draggable plugin which is being used in conjunction, could still function on the click-and-drag of the mouse. The patch noted in this ticket adds the ability of inspecting the current mouseHandled status, and changing it.

Changed September 30, 2011 09:29PM UTC by scottgonzalez comment:3

status: newpending

Why are you not using the actual API of _mouseStart()?

Changed September 30, 2011 09:44PM UTC by harking comment:4

status: pendingnew

I currently override _mouseStart, _mouseDrag, _mouseDown, and _mouseUp.

I probably could get away not using _mouseDown and instead use _mouseStart, but i definitely need to disable the _mouseDrag behavior in the parent ui.selectable and i use the _mouseUp to identify when click has completed so i can set the last-selected class on the last selected element.

Here is the current plugin. I'm no jquery ui expert, so if i should go about this another way, please let me know: http://jsfiddle.net/7Q7Vr/

The main point of the plugin is to allow ui.droppable to operate on tr's of a table, in combination with selectable on the tr's of the table

Changed October 01, 2011 05:02AM UTC by scottgonzalez comment:5

resolution: → invalid
status: newclosed

It sounds like you're doing something super hacky to work around bugs in our plugins.

Changed October 01, 2011 05:11AM UTC by harking comment:6

thanks.