Click on node assigned to slot in button's shadow cause loss of button focus
Reported by
j...@component.kitchen,
Oct 12
|
||||||||
Issue descriptionUserAgent: 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.
,
Oct 14
,
Oct 15
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!
,
Oct 25
Adding hayato@ as this is Shadow DOM-focus related
,
Oct 25
Which standard defines the correct behavior in this case? It is unclear to me what is the correct behavior.
,
Nov 5
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.
,
Nov 6
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.
,
Nov 6
cc: yoichio@, yosin@, fergal@, please feel free to work on this.
,
Nov 14
It appears that Safari has this same bug. See: https://github.com/w3c/webcomponents/issues/773.
,
Nov 15
jan@, if this issue is urgent, please let us know that. I'll mark this P1. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by dtapu...@chromium.org
, Oct 12