Opened 10 years ago
Closed 5 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 )
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) { this.destroy(); dojo.stopEvent(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 10 years ago by
Milestone: | tbd → 1.6 |
---|---|
Priority: | high → normal |
comment:2 Changed 10 years ago by
Milestone: | 1.6 → 1.7 |
---|
comment:3 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 8 years ago by
Milestone: | 1.8 → 2.0 |
---|
1.8 has been tagged; moving all outstanding tickets to next major release milestone.
comment:5 Changed 5 years ago by
Milestone: | 2.0 → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | new → closed |
Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.
punting new-ish 1.6 tickets to 1.7