Open Bug 568313 Opened 14 years ago Updated 22 days ago

Impossible to make <button>s draggable

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

defect

Tracking

()

Webcompat Priority P3

People

(Reporter: giorgio.liscio, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; WOW64; en-US; rv:1.9.3a5pre) Gecko/20100525 Minefield/3.7a5pre ( .NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; WOW64; en-US; rv:1.9.3a5pre) Gecko/20100525 Minefield/3.7a5pre ( .NET CLR 3.5.30729)

hi, as summary says, button can't be draggable
see the simple test attached

Reproducible: Always
Attached file testcase (obsolete) —
Any news about this?

Thanks
Firefox requires 'something' (that we call 'init' here) to be set in dragstart event to initialize the rest of drag events to occur.

This is probably because all of the DOM elements are draggable="true" by default in XUL. (reference: https://bugzilla.mozilla.org/show_bug.cgi?id=646823#c4)

Example:

<div id="something" draggable="true" ondragstart="event.dataTransfer.setData('text/plain', 'node');">Drag me</div>

Chrome doesn't require such 'initialization'.
I also get this bug and it's quite annoying. It works perfectly on Chrome but not on Firefox.
I can confirm that this bug occurs on Firefox 53.0.3 (64-bit) running on Linux. (Ubuntu 16.04).

I am aware of no work-around other than to redefine the <button> as another element, which isn't semantically valid for my scenario.
I can also confirm on Firefox 52.0 LTS on Windows 10.
(In reply to Ethan Jaszewski from comment #6)
> I can also confirm on Firefox 52.0 LTS on Windows 10.

This should read ESR, not LTS. Full user agent:

Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → Unspecified
Hardware: x86_64 → Unspecified
Summary: impossible to make <button>s draggable → Impossible to make <button>s draggable
It is still no working to this day.
Can confirm bug still exists in Firefox 60.0.1 on macOS.

User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Firefox/60.0
Dear Mozilla,  Respectfully, this bug has been open for 8 years.  Could somebody please acknowledge it and deliver a fix?  It appears to be affecting quite a few people.
This bug still persists in Firefox 61.0.1 in MacOS and Windows. It is currently blocking a critical feature of our application from working and the only workaround would force us to compromise on semantic markup. As an organization committed to accessibility, I hope Mozilla can dedicate some resources to fixing this longstanding bug.
Our drag and drop features, needs to be working on img tags, this bug stopping all that...
Flags: webcompat?
Whiteboard: [webcompat]

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

Whiteboard: [webcompat] → [webcompat-revisit]
Webcompat Priority: ? → revisit
Whiteboard: [webcompat-revisit]
Flags: webcompat?

Any updates?

This bug has been open for 10 years and still exists in FF 70.0.1.

Firefox 74.0.1 on windows:

A button is draggable only if you start dragging from its content. Not draggable if you start from the padding area
If no html content(even if it has css content) => Not draggable at all

Ex: https://jsbin.com/xeqowucuho/edit?html,css,js,output

Webcompat Priority: revisit → P3
Attached file testcase

It seems the original testcase provided in comment 1 has to some extent be solved, but the testcase provided in comment 16 shows it's still a problem in other situation.

This is a simplified testcase of the one in comment 16 which shows the problem. All three buttons should be equally draggable in this testcase.

Attachment #447591 - Attachment is obsolete: true

Lack of draggable support can inhibit the adoption of semantic <button> where they are deserved, and force developers to use role="button" with other elements instead.

Severity: normal → S3
See Also: → 1862019
Duplicate of this bug: 1862019
Duplicate of this bug: 646823
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: