Open Bug 725149 Opened 12 years ago Updated 2 years ago

Setting position:relative on td can cause out-of-sequence dragenter events

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

10 Branch
x86
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: natevw, Unassigned)

Details

Attachments

(1 file)

Attached file dragdropeventing.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10

Steps to reproduce:

In a dragenter handler for a <td>, I set a class that happened to match a style rule including { position:relative }.


Actual results:

After this style rule is applied, Firefox seems to reset its event algorithm and forget that it already sent a dragenter event to the current target. This causes:
- a second dragenter event to be sent, if the current target has not changed
- if the current target is changed to a child element, it receives a dragenter event WITHOUT the parent element subsequently receiving a dragleave event.

See attached test case.


Expected results:

According to http://dev.w3.org/html5/spec/dnd.html the dragenter event should not be fired unless the current target element changes. Also, if a dragenter event is fired on a new current target element, the previous target element must receive a dragleave event.
Attachment #595245 - Attachment mime type: text/plain → text/html
Component: Untriaged → Event Handling
Product: Firefox → Core
QA Contact: untriaged → events
Changing "position" recreates the CSS boxes, so does in fact change current event targets, sorta...
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: