[Dojo-interest] Drag'n Drop with CTRL key

Luis Magaña joe666 at gnovus.com
Mon Jan 15 12:52:04 MST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Doing a little bit more testing it seems that the ALT key does not
prevent the ondrop event to get fired, so I'll use this key as a
modifier instead of CTRL, perhaps CTRL is somehow conflicting with the
browser itself ?

Thank you for your help, very apprecciated.

Regards.

Luis Magaña
Gnovus Networks & Software
www.gnovus.com


Luis Magaña wrote:
> Thank you very much for your reply,
> 
> I've tried that code, but for some reason, if the CTRL key is pressed
> the OnDrop Event seems to be cancelled, that is, the function never get
> called.
> 
> I think is not being called because if I start the drag with or without
> the control key pressed everything seems to work ok, but if I release
> the mouse button on the target (drop) while the CTRL key is presed,
> nothing happens, the item doesn't move, it doesn't even go back to it's
> original position.
> 
> Perhaps this is a not implemented feature ?
> 
> regards.
> 
> Luis Magaña
> Gnovus Networks & Software
> www.gnovus.com
> 
> 
> Wolfram Kriesing wrote:
>> you can try to
> 
>> var ctrlPressed = false;
>> var k = dojo.event.browser.keys;
>> dojo.event.connect(window, "keydown", function(evt) {
>>   ctrlPressed = evt.keyCode==k.KEY_CTRL});
> 
>> and then u simply drag and drop and on dropping (or whenever) you can
>> check ctrlPressed
> 
>> On 1/15/07, Luis Magaña <joe666 at gnovus.com> wrote:
>> Hi,
> 
>> Is it possible to perform drag and drop while a key such as CTRL or
>> SHIFT is pressed ?
> 
>> Regards.
> 
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> 
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest at dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-interest
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFq9tk+QIHCUdTm7sRAtEPAJ9IBbHZOsNIJkcB0cHydi6wkhymKgCgwM3P
L0D4yCcpJ7nLDBtA2Fw7fmw=
=/3Hi
-----END PGP SIGNATURE-----


More information about the Dojo-interest mailing list