Opened 12 years ago

Closed 7 years ago

#11787 closed defect (patchwelcome)

DnD Moveable stuck to cursor on right-click in Chrome

Reported by: J Cameron Cooper Owned by: Eugene Lazutkin
Priority: high Milestone: 1.13
Component: DnD Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Eugene Lazutkin)

With current Chrome (on Linux at least) a dojo.dnd.Movable can easily get stuck to the cursor on a right-click because the browser doesn't provide a mouseup event, just the mousedown. (Presumably the browser context menu swallows the mouseup.) The new dojo.dnd.Mover listens for a mouseup to destroy itself, but cannot get one (and since it's listening for the triggering button, a left-click doesn't work either.)

FF doesn't exhibit this problem; its context menu seems to send both events.

User behavior on this error is: (1) click some more, and (2) try the Esc button. I've just fixed (1), but it probably wouldn't hurt to listen for Esc.

It's tricky to listen for subsequent mousedowns in the Mover, since the Movable connects to and stops mousedowns, and has no connection to the Movers it creates. However, it doesn't trap onclick, so I've used that event to kill the Mover if it misses a mouseup. The (very simple) method:

  onMouseClick = function(event) {

plus adding a dojo.connect in the constructor.

This only gets triggered in a "stuck" situation, since usually the mouseup will kill the Mover, and thus the object never sees a full click.

BTW, this is similar in behavior to, but not the same problem as, #6839.

Change History (5)

comment:1 Changed 12 years ago by Eugene Lazutkin

Milestone: tbd1.6
Priority: highnormal

comment:2 Changed 11 years ago by bill

Milestone: 1.61.7

punting new-ish 1.6 tickets to 1.7

comment:3 Changed 10 years ago by Eugene Lazutkin

Description: modified (diff)

comment:4 Changed 10 years ago by Colin Snover

Milestone: 1.82.0

1.8 has been tagged; moving all outstanding tickets to next major release milestone.

comment:5 Changed 7 years ago by dylan

Milestone: 2.01.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.