Bug 260060 - [visionOS] WKContentView doesn't relinquish first responder after tapping Safari unified field
Summary: [visionOS] WKContentView doesn't relinquish first responder after tapping Saf...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-10 21:59 PDT by Ryan Fuller
Modified: 2023-08-14 07:30 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.