Changes between Initial Version and Version 3 of Ticket #11787


Ignore:
Timestamp:
Mar 24, 2012, 6:25:16 AM (8 years ago)
Author:
Eugene Lazutkin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11787

    • Property Priority changed from high to normal
    • Property Milestone changed from tbd to 1.7
  • Ticket #11787 – Description

    initial v3  
    1 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.)
     1With 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.)
    22
    33FF doesn't exhibit this problem; its context menu seems to send both events.
     
    77It'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:
    88
    9 {{
     9{{{
     10#!js
    1011  onMouseClick = function(event) {
    1112    this.destroy();
    1213    dojo.stopEvent(event);
    1314  }
    14 }}
     15}}}
    1516
    16 plus adding a {{dojo.connect}} in the constructor.
     17plus adding a `dojo.connect` in the constructor.
    1718
    1819This only gets triggered in a "stuck" situation, since usually the mouseup will kill the Mover, and thus the object never sees a full click.