WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
229600
WKWebView: cannot become first responder using focus() in JavaScript or native becomeFirstResponder() method
https://bugs.webkit.org/show_bug.cgi?id=229600
Summary
WKWebView: cannot become first responder using focus() in JavaScript or nativ...
Daohan Chong
Reported
2021-08-26 21:45:35 PDT
For example, if we'd like to build a web based text editor, we'd like to automatically focus on the text input area in `UIViewController.viewDidAppear`. However, we cannot build behavior like this using public API. For example, all these won't work: - Calling `htmlElement.focus()` does nothing. - `WKWebView.becomeFirstResponder()` The community is trying to explore how to work around this missing feature:
https://stackoverflow.com/questions/32449870/programmatically-focus-on-a-form-in-a-webview-wkwebview/48623286#48623286
This can be reproduced on iOS 13 to iOS 15 beta.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-09-02 21:46:18 PDT
<
rdar://problem/82708554
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug