New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 762829 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 771580
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

event.target returns null when dispatch event has finished if the target is inside the shadow tree

Project Member Reported by elkurin@google.com, Sep 7 2017

Issue description

Chrome Version: 62.0.3202.0 (Developer Build) (64-bit)
OS: Linux OS

JS code:
http://jsbin.com/dipudusowi/1/edit?html,output

Expected result:
event.target should return target.
In the spec, currentTarget, composedPath() and eventPhase are set to null or none, but target is not set to null.
https://dom.spec.whatwg.org/#dispatching-events

Actual result:
event.target returns null.
This doesn't happen when the target is in document tree scope.
http://jsbin.com/yiqulihova/1/edit?html,output
 

Comment 1 by kochi@chromium.org, Oct 6 2017

The spec was clarified upstream (WHATWG DOM)
https://github.com/whatwg/dom/pull/513

Test will be added for the conformance.
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c1d91c2ce388ffd5bfb0c005cd1c9f7016c7e3a

commit 9c1d91c2ce388ffd5bfb0c005cd1c9f7016c7e3a
Author: Eriko Kurimoto <elkurin@google.com>
Date: Fri Oct 06 09:20:06 2017

Add test for the behavior after EventDispatch

This corresponds to the DOM spec change
https://github.com/whatwg/dom/pull/513
not to leak elements inside shadow tree after event 
dispatch is complete.

Bug:  771580 ,  762829 
Change-Id: Ib77b4475c2c5bf174a6bcf3dc9f4dff583fd7d2a
Reviewed-on: https://chromium-review.googlesource.com/681894
Commit-Queue: Eriko Kurimoto <elkurin@google.com>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507013}
[modify] https://crrev.com/9c1d91c2ce388ffd5bfb0c005cd1c9f7016c7e3a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/Extensions-to-Event-Interface.html
[add] https://crrev.com/9c1d91c2ce388ffd5bfb0c005cd1c9f7016c7e3a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/event-post-dispatch-expected.txt
[add] https://crrev.com/9c1d91c2ce388ffd5bfb0c005cd1c9f7016c7e3a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/event-post-dispatch.html
[modify] https://crrev.com/9c1d91c2ce388ffd5bfb0c005cd1c9f7016c7e3a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/event-with-related-target.html
[modify] https://crrev.com/9c1d91c2ce388ffd5bfb0c005cd1c9f7016c7e3a/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/resources/event-path-test-helpers.js

Project Member

Comment 3 by sheriffbot@chromium.org, Oct 11 2017

Labels: Hotlist-Recharge-BouncingOwner
Owner: ----
Status: Untriaged (was: Assigned)
The assigned owner "elkurin@google.com" is not able to receive e-mails, please re-triage.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 4 by kochi@chromium.org, Oct 12 2017

Owner: kochi@chromium.org
Status: Assigned (was: Untriaged)

Comment 5 by kochi@chromium.org, Oct 13 2017

Mergedinto: 771580
Status: Duplicate (was: Assigned)
Deduping to the other bug.

Sign in to add a comment