[whatwg/dom] `customelement.blur()` should cancel all the focus in ShadowDOM? (#1008)

example:
```js
class MyElement extends HTMLElement {
  constructor() {
    super();
    this.attachShadow({mode: 'open'});
    this.shadowRoot.innerHTML = '<div tabindex=1>foucesable</div>';
  }
  
  connectedCallback() {
    this.shadowRoot.querySelector('div').focus();
  }
}
customElements.define('my-ele', MyElement);
document.body.append(new MyElement());

document.querySelector('my-ele').blur();
document.body.append(`current active element: ${document.activeElement.tagName}`);
```

Firefox: current active element: MY-ELE 
Chrome: current active element: BODY
Safari: current active element: BODY

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1008

Received on Friday, 20 August 2021 21:19:06 UTC