Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to remove: support for old drag events

84 views
Skip to first unread message

Neil Deakin

unread,
Jun 9, 2015, 10:17:16 AM6/9/15
to dev-pl...@lists.mozilla.org, dev-ext...@lists.mozilla.org
In bug 1162050, we'd like to remove support for the old non-standard
drag events, which were left in for a period of compatibility.

The 'draggesture' event should be replaced with the 'dragstart' event
(such as ondragstart)
The 'dragdrop' event should be replaced with the 'drop' event.

If you use these events, they are fired in the same manner as the
standard events, so it should be a simple matter of searching and
replacing the event names.

The non-standard dragexit event will remain as is, as it has no exact
standard equivalent.

Firefox does not use these events in its code. I filed bug 1171979 for
fixing this in Thunderbird and bug 1171980 for fixing this in Seamonkey.
If you use these events anywhere or you are the author of an add-on that
uses these events, you will need to update your code as described above.

The standard drag and drop API is described at:

https://html.spec.whatwg.org/multipage/interaction.html#dnd
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_and_drop

In addition, we would like to remove the long-deprecated
nsDragAndDrop.js script located in toolkit/content in favour of the
standard drag and drop API, described at the links above. To ease the
transition, if necessary, you may wish to include this script (
https://dxr.mozilla.org/mozilla-central/source/toolkit/content/nsDragAndDrop.js
) directly in your project.

Please respond if there are any concerns.

smaug

unread,
Jun 9, 2015, 11:47:12 AM6/9/15
to Neil Deakin
On 06/09/2015 05:17 PM, Neil Deakin wrote:
> In bug 1162050, we'd like to remove support for the old non-standard drag events, which were left in for a period of compatibility.
>
yes please. Anything we can do to simplify dnd code is good.



-Olli

Ehsan Akhgari

unread,
Jun 10, 2015, 12:35:24 AM6/10/15
to Neil Deakin, dev-pl...@lists.mozilla.org, dev-ext...@lists.mozilla.org
On 2015-06-09 10:17 AM, Neil Deakin wrote:
> In bug 1162050, we'd like to remove support for the old non-standard
> drag events, which were left in for a period of compatibility.

This is great!

As far as I know, these events have never been supported by another
browser engine. Is that correct? If so, hopefully not a lot of
websites would be affected by this these days.

Jonas Sicking

unread,
Jun 10, 2015, 12:44:45 AM6/10/15
to Ehsan Akhgari, Neil Deakin, dev-platform, dev-ext...@lists.mozilla.org
On Wed, Jun 10, 2015 at 12:35 PM, Ehsan Akhgari <ehsan....@gmail.com> wrote:
> On 2015-06-09 10:17 AM, Neil Deakin wrote:
>>
>> In bug 1162050, we'd like to remove support for the old non-standard
>> drag events, which were left in for a period of compatibility.
>
> This is great!

I agree it's great if we can remove this. But do we have any data that
this won't break websites? We do know that websites quite often use
browser-specific features, including Gecko specific ones.

/ Jonas

Karl Dubost

unread,
Jun 10, 2015, 1:21:40 AM6/10/15
to Jonas Sicking, Neil Deakin, Ehsan Akhgari, dev-platform, dev-ext...@lists.mozilla.org
Jonas,

Le 10 juin 2015 à 13:44, Jonas Sicking <jo...@sicking.cc> a écrit :
> But do we have any data that this won't break websites?

nope. But at first sight, it doesn't seem used at all.
https://github.com/search?q=draggesture&type=Issues&utf8=%E2%9C%93

And most of the JS code is also quite unrelated or from books
https://github.com/search?l=javascript&q=draggesture&type=Code&utf8=%E2%9C%93


--
Karl Dubost, Mozilla
http://www.la-grange.net/karl/moz

Chris Peterson

unread,
Jun 10, 2015, 2:52:14 AM6/10/15
to
On 6/9/15 10:21 PM, Karl Dubost wrote:
> Jonas,
>
> Le 10 juin 2015 à 13:44, Jonas Sicking <jo...@sicking.cc> a écrit :
>> But do we have any data that this won't break websites?
>
> nope. But at first sight, it doesn't seem used at all.
> https://github.com/search?q=draggesture&type=Issues&utf8=%E2%9C%93
>
> And most of the JS code is also quite unrelated or from books
> https://github.com/search?l=javascript&q=draggesture&type=Code&utf8=%E2%9C%93

It looks like some addons will be affected:

https://mxr.mozilla.org/addons/search?string=draggesture%22&tree=addons&case=1

https://mxr.mozilla.org/addons/search?string=dragdrop%22&tree=addons&case=1


0 new messages