Feature Request: selectionchange event on Shadow Root
Reported by
xenx...@gmail.com,
Mar 2 2018
|
||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Steps to reproduce the problem:
1. Create a custom element with an attached shadow root
2. Attach an event listener to listen to the selectionchange event from the shadow root
3. Add that element to the DOM.
Simple code to reproduce:
customElements.define("test-element", class extends HTMLElement {
constructor () {
super()
this.attachShadow({mode:"open"})
}
connectedCallback () {
this.shadowRoot.innerHTML = "<div contenteditable='true'></div>"
this.shadowRoot.addEventListener("selectionchange", () => {
console.warn("Selection modified")
})
}
})
document.body.innerHTML += "<test-element></test-element>"
What is the expected behavior?
The selectionchange event should fire when a [contenteditable] element is modified inside of a shadow root.
What went wrong?
The event didn't fire fire. It does however, fire on the global Document.
Did this work before? No
Does this work in other browsers? N/A
Chrome version: 64.0.3282.186 (Developer Build) (64-bit) Channel: n/a
OS Version: 4.15.6-1-ARCH
Flash Version:
,
Mar 4 2018
,
Mar 5 2018
xenxier@ Thanks for the issue. From the Bug title, this is a Feature Request. Hence marking this as Untriaged for further updates from Dev. Thanks..
,
Mar 16 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by xenx...@gmail.com
, Mar 2 2018