| Summary: | Select on iPad doesn't refresh dropdown UI after an option is removed | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michał Gołębiowski-Owczarek <m.goleb+bugzilla> |
| Component: | Forms | Assignee: | Aditya Keerthi <akeerthi> |
| Status: | RESOLVED FIXED | ||
| Severity: | Critical | CC: | akeerthi, bfulgham, cdumez, michael, simon.fraser, webkit-bug-importer, wenson_hsieh, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 15 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 15 | ||
|
Description
Michał Gołębiowski-Owczarek
2022-01-31 13:19:50 PST
There's an older related issue: https://bugs.webkit.org/show_bug.cgi?id=128721 However, that one is quite old and it affected both iPhone & iPad. Plus, as I mentioned, I cannot reproduce the issue I now reported on iPad 13.5 so it seems to be a new issue. I'll add that when the outdated UI appears with the first option still present, clicking on the second visible option will activate the second real option in the select - which is a different one. For example, if you have options: * empty * A * B and you remove the first empty option, hitting the issue and then open the dropdown & choose "A", it will actually select "B" as that's what's under index 1 at the moment. It's not just a visual quirk, it creates a really broken behavior. I think this issue is due to the fact that, specifically on iPad, <select> elements are not blurred when the dropdown is dismissed. The options themselves are populated when the element is focused, so the state is inconsistent. A workaround would be to blur the element before/after changing the options (via select.blur()). To fix in WebKit, I think we'll need to trigger a FocusedElementInformation update when options are changed. Blurring is quite invasive and I imagine it may have accessibility consequences. Is there a workaround that's less user hostile? Any additional info? Any workarounds that are not as invasive? This is a pretty serious issue for any AngularJS app using selects... Any updates? This continues to be an issue in the latest stable iPad OS 15.x and there's no good workaround. Pull request: https://github.com/WebKit/WebKit/pull/21504 Committed 271805@main (cb12141f93d1): <https://commits.webkit.org/271805@main> Reviewed commits have been landed. Closing PR #21504 and removing active labels. |