RESOLVED FIXED 167898
[iOS] -[WKWebView becomeFirstResponder] and -[WKWebView resignFirstResponder] don’t get called when non-programmatic first responder changes happen
https://bugs.webkit.org/show_bug.cgi?id=167898
Summary [iOS] -[WKWebView becomeFirstResponder] and -[WKWebView resignFirstResponder]...
mitz
Reported 2017-02-06 12:05:55 PST
Because the child WKContentView can and does become first responder, WKWebView’s -becomeFirstResponder never gets called by UIKit. Similarly, because the WKWebView is never the first responder, its -resignFirstResponder is never called. This means that overrides of these methods in a WKWebView subclass normally don’t get called.
Attachments
Make WKContentView’s -becomeFirstResponder and -resignFirstResponder forward to the WKWebView (7.12 KB, patch)
2017-02-06 18:04 PST, mitz
thorton: review+
mitz
Comment 1 2017-02-06 18:04:01 PST
Created attachment 300776 [details] Make WKContentView’s -becomeFirstResponder and -resignFirstResponder forward to the WKWebView
Tim Horton
Comment 2 2017-02-06 18:07:37 PST
Comment on attachment 300776 [details] Make WKContentView’s -becomeFirstResponder and -resignFirstResponder forward to the WKWebView View in context: https://bugs.webkit.org/attachment.cgi?id=300776&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:1017 > + if (currentContentView == _contentView && [_contentView superview]) usesStandardContentView? > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:854 > + _becomingFirstResponder = YES; ScopedChange? or whatever we called it?
mitz
Comment 3 2017-02-06 20:25:38 PST
Note You need to log in before you can comment on or make changes to this bug.