New issue
Advanced search Search tips

Issue 648345 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 618587
Owner: ----
Closed: Sep 2016
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

[ShadowDOM v1] nested shadow roots trap focus

Project Member Reported by valdrin@google.com, Sep 19 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36

Steps to reproduce the problem:
1. create 2 divs with shadow roots
2. append an input into the inner div light dom
3. insert inner div into outer div light dom
4. append outer div in body, add other focusables
5. TAB through the focusables

var template = document.createElement('template');
template.content.appendChild(document.createElement('slot'));

var inner = document.createElement('div');
inner.attachShadow({mode: 'open'}).appendChild(document.importNode(template.content, true));
inner.appendChild(document.createElement('input'));

var outer = document.createElement('div');
outer.attachShadow({mode: 'open'}).appendChild(document.importNode(template.content, true));
outer.appendChild(inner);

document.body.appendChild(document.createElement('input'));
document.body.appendChild(outer);
document.body.appendChild(document.createElement('input'));

What is the expected behavior?
focus should move outside the shadow root

What went wrong?
focus is trapped into `inner` div

Did this work before? N/A 

Chrome version: 53.0.2785.113  Channel: n/a
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 23.0 r0
 

Comment 1 by rsesek@chromium.org, Sep 19 2016

Components: Blink>DOM
Project Member

Comment 2 by sheriffbot@chromium.org, Sep 20 2016

Labels: Hotlist-Google

Comment 3 by tkent@chromium.org, Sep 20 2016

Components: -Blink>DOM Blink>WebComponents

Comment 4 by hayato@chromium.org, Sep 21 2016

Mergedinto: 618587
Status: Duplicate (was: Unconfirmed)

Comment 5 by valdrin@google.com, Sep 21 2016

hayato@ I don't think this is a duplicate, as it happens with delegatesFocus = false (default), and https://bugs.chromium.org/p/chromium/issues/detail?id=618587 is instead happening with delegatesFocus = true

Comment 6 by hayato@chromium.org, Sep 22 2016

Thanks. My intention of merging was that I think this is a general bug in tab focus navigation in Shadow DOM v1, regardless the value of delegatesFocus.

Sign in to add a comment