Add content covering the limitations of <selectedcontent>#39411
Add content covering the limitations of <selectedcontent>#39411hamishwillee merged 5 commits intomdn:mainfrom
Conversation
|
Preview URLs (comment last updated: 2025-05-27 08:49:34) |
estelle
left a comment
There was a problem hiding this comment.
I am not even sure should be included yet on MDN. This review is based on us keeping it for now
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Hamish Willee <[email protected]>
Is this a specification bug or an implementation bug? |
I think this was a specification choice (not bug) to avoid over-cloning. See my other comment here for more context. |
| > [!WARNING] | ||
| > In particular, this may cause issues with sites that use popular front-end JavaScript frameworks where {{htmlelement("option")}} elements are dynamically updated after creation, as these updates will not be cloned to the `<selectedcontent>` element. |
There was a problem hiding this comment.
I have merged my suggestion of @chrisdavidmills compromise solution - FYI @estelle @philipwalton
Like all compromises, I suspect none of us will be completely happy. But is this "good enough" for all of you?
There was a problem hiding this comment.
This works for me.
There was a problem hiding this comment.
Works for me too, thanks all! (And sorry for the delayed reply.)
|
OK. Good enough for me. Thanks all. |
Description
This PR updates the
<selectedcontent>reference document to:<selectedcontent>and instead rely on the framework's existing UI synchronization feature.Motivation
After seeing this Angular bug related to
<selectedcontent>as well as testing the behavior of<selectedcontent>in several other frameworks and discovering issues, I believe it's important to update the MDN docs to clarify both the use cases for<selectedcontent>as well as its limitations. This should help ensure developers aren't confused by issues they run into when trying to use this new element.FYI, I've discussed this recommendation with folks on the Chrome team working on the customizable
<select>feature, and they're comfortable with this recommendation.Additional details
Related issues and pull requests