| Summary: | REGRESSION (255086@main): Safari 16.4 and above does not render <option> label/text updates until <select> is focused | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Josef Lange <josef.d.lange> |
| Component: | Forms | Assignee: | Aditya Keerthi <akeerthi> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ahmad.saleem792, akeerthi, cdumez, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar, Regression |
| Version: | Safari 16 | ||
| Hardware: | All | ||
| OS: | All | ||
| URL: | https://codepen.io/jdl90/pen/KKGpXax | ||
| Bug Depends on: | |||
| Bug Blocks: | 245928 | ||
|
Description
Josef Lange
2023-04-10 08:59:26 PDT
16.4 release notes have this line (not referring to any commit or anything, so idk how far back the change goes): "Fixed updating Text node children of an option element to not reset the selection of the select element." Seems like a possible place to look for the source of this regression. Another note:
Given a reference to the `<select>`, this is a partial workaround:
```
const theSelect = document.querySelector('select#theSelect');
const theOption = document.querySelector('option#theOption');
theOption.innerText = 'Some new text';
if (theOption.selected) {
theSelect.value = null;
theOption.selected = 'selected';
}
```
The label of the <select> control _does_ update, however the control does not expand to contain the full length of that label until the select control is clicked or otherwise focused.
I can reproduce with the latest Safari. The issue doesn't reproduce in Chrome. Thanks for the test case, I'll see if I can bisect this. This is a regression from Ahmad's 255086@main. Pull request: https://github.com/WebKit/WebKit/pull/12577 Committed 262791@main (d86fed1a2d3d): <https://commits.webkit.org/262791@main> Reviewed commits have been landed. Closing PR #12577 and removing active labels. |