-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(ios): Make Bridge webView first responder #7753
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using self.webView?.becomeFirstResponder()
in the same line were self.becomeFirstResponder()
was also seems to work fine without the addition of the viewDidAppear
override.
Rethinking this comment, the viewDidAppear
method will be called in apps that embed the CAPBridgeViewController.swift
whenever it appears, so putting the line there will make the WebView to regain focus, so looks like a better place than viewDidLoad
.
@Steven0351 thoughts?
Just remembered this |
Yeah - |
Nothing in here would affect Portals at all, so it's all good 👍, +1 for |
Not portals but embedded Capacitor, not sure what his name is nowadays. I think this should be behind a |
Fixes a focus issue (reproduction) caused when the webView is not the first responder. CAPBridgeViewController's
self.becomeFirstResponder()
was being called duringviewDidLoad
, before the view's window is set, which had no effect.