Bug 257553

Summary: Selecting OptGroup label does not deselect selected item
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: BrowserCompat, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2023-05-31 11:11:44 PDT
Hi Team,

While going through Blink's commit, I came across another issue, where we lost selection if click on label while Firefox Nightly 115 and Chrome Canary 116 does not.

Testcase: https://jsfiddle.net/aqwnsfzt/

^ Select on 'Selection' and then try to select 'label' and you will lose selection in Safari 16.5

Blink Commit: https://src.chromium.org/viewvc/blink?view=revision&revision=171470

WebKit Source: https://github.com/WebKit/WebKit/blob/b37f820dae2abeffca68dc3c9ec6831d8b16f370/Source/WebCore/html/HTMLSelectElement.cpp#L1329

Doing local testing, it does fix the issue and don't fail any test in /fast/forms/select and imported/w3c/web-platform-tests/html/.

We might need to skip it on iOS (test case).

Just wanted to raise, so we can fix it.

Marking this as 'BrowserCompat' as well.

Thanks!
Comment 1 EWS 2023-05-31 17:03:58 PDT
Committed 264767@main (734687da6292): <https://commits.webkit.org/264767@main>

Reviewed commits have been landed. Closing PR #14545 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2023-05-31 17:04:19 PDT
<rdar://problem/110088331>