-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to set keyboardDisplayRequiresUserAction #139
Ability to set keyboardDisplayRequiresUserAction #139
Conversation
package.json
Outdated
@@ -70,12 +70,12 @@ | |||
"readmeFilename": "README.md", | |||
"repository": { | |||
"type": "git", | |||
"url": "git+https://github.com/CRAlpha/react-native-wkwebview.git" | |||
"url": "git+https://github.com/craigblagg/react-native-wkwebview.git" |
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.
Please, revert this change so it can be merged
react-native-wkwebview.podspec
Outdated
@@ -8,12 +8,12 @@ Pod::Spec.new do |s| | |||
s.summary = "React Native WKWebView for iOS" | |||
s.author = "Ruoyu Sun <ruoysun@gmail.com> (https://github.com/insraq)" | |||
|
|||
s.homepage = "https://github.com/CRAlpha/react-native-wkwebview" | |||
s.homepage = "https://github.com/craigblagg/react-native-wkwebview" |
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.
these ones too
Have now rebased the branch - dropping the changes for your comments above (had just updated them so could use my branch in our apps). |
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.
@CRAplha kindly merge this. I can confirm it’s working.
Thanks
Hmm... It seems that this is done by swizzling a private WkWebview method. Would it be problematic during App Review process? Also, this component tries to stay as a thin wrapper of the official WkWebview public API and avoid incorporate "hacks" like this. So I am a bit reluctant to merge this unless there is a good reason. |
It’s the same swizzling approach that is in use within the Ionic framework
- with which a number of apps are in the App Store.
So don’t foresee concerns around that - but haven’t first hand put an app
in the App Store with it as yet.
…On Wed, May 16, 2018 at 4:51 PM Ruoyu Sun ***@***.***> wrote:
Hmm... It seems that this is done by swizzling a private WkWebview method.
Would it be problematic during App Review process?
Also, this component tries to stay as a thin wrapper of the official
WkWebview public API and avoid incorporate "hacks" like this. So I am a bit
reluctant to merge this unless there is a good reason.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#139 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYPqh7Ra_TlcKbnpuInQfsxnnIIGRpvks5tzJFUgaJpZM4Tilde>
.
|
I can confirm that it’s not problematic during app review. But I get your point @insraq, if it was possible(easy) to publish this patch as a separate package, that would have been the best option. |
Since it does not cause any trouble for people who don't use it, I have merged this PR. I guess if WkWebView changed their private method signature again, we need to update this hack. Anyway, it should be on npm@1.20.0. |
👍 I'll keep an eye out for any changes in the signature, and update accordingly should they come up |
@craigblagg This solution is not working for me on iOS 11.4. The keyboard behavior does not change when adding the |
I’m away from a machine for a week, but I’ll look at the method signature
when back - to see if it’s changed to. As that changing would be the only
thing to effect it.
…On Fri, Aug 31, 2018 at 10:37 PM Brandon Schlenker ***@***.***> wrote:
@craigblagg <https://github.com/craigblagg> This solution is not working
for me on iOS 11.4. The keyboard behavior does not change when adding the
keyboardDisplayRequiresUserAction flag. Further adding the swizzle
directly in my AppDelegate has no effect either.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#139 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYPquWahdHRxOxSHyztaX2ppjuiDlVQks5uWZ52gaJpZM4Tilde>
.
|
@brandons - this may not apply to 11.4, but 12.2+ has a different selector ( |
Issue:
When setting focus on an input that lives inside the webview, the keyboard is not displayed.
UIWebView offers keyboardDisplayRequiresUserAction which allows for this to act as one would expect.
Solution:
Use documented approaches to recreating this for a WKWebView - and expose it to React Native.