Bug 260060

Summary: [visionOS] WKContentView doesn't relinquish first responder after tapping Safari unified field
Product: WebKit Reporter: Ryan Fuller <ryanfuller>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: megan_gardner, richard_robinson2, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ryan Fuller 2023-08-10 21:59:58 PDT
WKContentView has logic to prevent resigning of firstResponder status when it is resigning due to a keyboard dismissal request (and it is the FR already). This is because in that case it will becomeFirstResponder right after anyway.

The issue is that sometime the notification of the keyboard dismissal does not happen right away, and in that case, it incorrectly does not resign first responder.

We can make this logic (deciding to not resign FR) more robust by gating on `_isEditable` as well, which prevents this bad state.
Comment 1 Wenson Hsieh 2023-08-11 09:06:18 PDT
rdar://113732040
Comment 2 Ryan Fuller 2023-08-11 16:09:03 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16628
Comment 3 EWS 2023-08-14 07:30:21 PDT
Committed 266863@main (8222cb10b1d0): <https://commits.webkit.org/266863@main>

Reviewed commits have been landed. Closing PR #16628 and removing active labels.