This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13524 - relatedTarget shouldn't be null for dragleave event(as mouseout)
Summary: relatedTarget shouldn't be null for dragleave event(as mouseout)
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords: a11y
Depends on:
Blocks:
 
Reported: 2011-08-02 18:43 UTC by contributor
Modified: 2014-01-14 00:43 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2011-08-02 18:43:38 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html
Multipage: http://www.whatwg.org/C#the-dragevent-interface
Complete: http://www.whatwg.org/c#the-dragevent-interface

Comment:
relatedTarget shouldn't be null for dragleave event(as mouseout)

Posted from: 188.17.104.28
User agent: Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.9.168 Version/11.50
Comment 1 Michael[tm] Smith 2011-08-04 05:04:04 UTC
mass-moved component to LC1
Comment 2 Ian 'Hixie' Hickson 2011-08-11 02:58:38 UTC
Do you have a test case demonstrating this? What should it be?
Comment 3 Michael Cooper 2011-09-20 15:18:51 UTC
Bug triage sub-team is tracking this because of drag and drop, doesn't yet have an opinion one way or the other on the issue raised.
Comment 4 Ian 'Hixie' Hickson 2011-09-27 22:24:36 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: It's null in WebKit, at least (I happened to test that one because it's easy to set breakpoints in WebKit). If it's not null in another browser, please attach a test case demonstrating it.
Comment 5 Andrew R 2013-12-19 22:49:28 UTC
Open bug in webkit: https://bugs.webkit.org/show_bug.cgi?id=66547

Similar, fixed bug in mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=458613

Test case: http://jsfiddle.net/3yWqy/1/
(If I need to submit an actual HTML file to be legit, let me know)

In Firefox 26.0, relatedTarget on a dragleave is the DOM element being entered (the element which subsequently triggers a dragenter). Similarly, for dragenter it's the DOM element being left.  Essentially, dragleave and dragenter are treated as mirror events, as they should be -- dragleave.target = dragenter.relatedTarget and dragleave.relatedTarget = dragenter.target.

This makes much more sense than setting it to null, and is much more useful.

Can we reopen this issue?
Comment 6 Andrew R 2014-01-11 01:58:43 UTC
Reopening pursuant to:

> If you have additional information and would like the editor to reconsider, please reopen this bug.
Comment 7 Ian 'Hixie' Hickson 2014-01-14 00:43:18 UTC
Ok, I've tried to spec this. Please don't hesitate to reopen this bug if the edit isn't complete enough, or if it doesn't match Firefox precisely (assuming what Firefox does is better).
Comment 8 contributor 2014-01-14 00:43:26 UTC
Checked in as WHATWG revision r8396.
Check-in comment: Make some dragleave and dragenter events have a relatedTarget.
http://html5.org/tools/web-apps-tracker?from=8395&to=8396