New issue
Advanced search Search tips

Issue 894931 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Click on node assigned to slot in button's shadow cause loss of button focus

Reported by j...@component.kitchen, Oct 12

Issue description

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

Steps to reproduce the problem:
1. Create a custom element that has a button element containing a slot.
2. Instantiate the button with some light DOM children.
3. Click on the light DOM children that appear inside the button.

Repro: https://codepen.io/JanMiksovsky/pen/OBjzeY?editors=1000#0

What is the expected behavior?
Clicks anywhere inside the button — on shadow elements, or on nodes assigned to the slot inside the button — should behave the same. Specifically, the button should not lose focus.

What went wrong?
The button loses focus.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 71.0.3578.0  Channel: canary
OS Version: OS X 10.14.0
Flash Version: 

This bug report is meant to build on Chrome's existing beneficial behavior in which a click on a button moves keyboard focus to that button. For the record, Safari and Firefox don't do that, which is unfortunate. This bug seeks to extend Chrome's good behavior to buttons that have a Shadow DOM slot.
 
buttonWithShadow.html
1.4 KB View Download
Components: Blink>DOM
Labels: Needs-Triage-M71
Cc: viswa.karala@chromium.org
Labels: Triaged-ET Target-72 M-72 FoundIn-71 FoundIn-70 FoundIn-72 FoundIn-69 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on chrome reported version# 71.0.3578.0 and on latest chrome# 72.0.3580.0 using Ubuntu 14.04, Windows-10 and Mac 10.12.6 with URL provided in comment# 0. As this issue is seen from M-60(60.0.3112.0), hence considering this issue as Non-Regression and marking it as Untriaged.

Thanks!
Owner: hayato@chromium.org
Status: Assigned (was: Untriaged)
Adding hayato@ as this is Shadow DOM-focus related
Cc: hayato@chromium.org
Components: -Blink>DOM Blink>HTML>Focus Blink>DOM>ShadowDOM
Owner: ----
Status: Available (was: Assigned)
Which standard defines the correct behavior in this case?
It is unclear to me what is the correct behavior.
I can't tell you what HTML standard is applicable here, or whether any standard applies here.

All I can tell you is that the current behavior seems self-evidently wrong. From a user perspective, I would think that all clicks anywhere inside a button should behave exactly the same.
Owner: rakina@chromium.org
Thanks. Neither me. :) I couldn't find which part of standard is applicable.

I am aware that this is frustrating to users. Maybe Blink should fix this. We might want to update the standard as well before that, if the standard is wrong.

@rakina, could you have a chance to work on this? kochi@ worked on the focus things.
Cc: yoichio@chromium.org fergal@chromium.org yosin@chromium.org
cc: yoichio@, yosin@, fergal@, please feel free to work on this.
It appears that Safari has this same bug. See: https://github.com/w3c/webcomponents/issues/773.
Status: Assigned (was: Available)
jan@, if this issue is urgent, please let us know that. I'll mark this P1.

Sign in to add a comment