You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the logic in BrowserRenderer.ts performs the DOM updates in such an order that it can't set the .value on a <select> (unless it was already populated earlier).
It's because it tries to apply attributes to elements first before then populating their descendants. That's no good for a <select>, because you can't set the .value to anything that doesn't already match one of the <option> descendants.
To fix this:
Change the logic in insertElement to populate descendants before applying attributes
Change the logic in the EditType.setAttribute case in applyEdits to apply edits to descendants before applying edits to attributes
Add tests for all these scenarios
If it turns out this is insufficient (e.g., there are also cases where you need to set the attributes before updating descendants) we'll need more HTML-specific logic that uses different update orders depending on the element types.
The text was updated successfully, but these errors were encountered:
Currently, the logic in
BrowserRenderer.ts
performs the DOM updates in such an order that it can't set the.value
on a<select>
(unless it was already populated earlier).It's because it tries to apply attributes to elements first before then populating their descendants. That's no good for a
<select>
, because you can't set the.value
to anything that doesn't already match one of the<option>
descendants.To fix this:
insertElement
to populate descendants before applying attributesEditType.setAttribute
case inapplyEdits
to apply edits to descendants before applying edits to attributesIf it turns out this is insufficient (e.g., there are also cases where you need to set the attributes before updating descendants) we'll need more HTML-specific logic that uses different update orders depending on the element types.
The text was updated successfully, but these errors were encountered: