cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-10376) autofocus doesn't work with WKWebView engine plugin
Date Fri, 09 Jun 2017 22:57:18 GMT


ASF GitHub Bot commented on CB-10376:

GitHub user ccorcos opened a pull request:

    CB-10376: (ios) Fix bug where WKWebView doesnt respect the KeyboardDisplayRequiresUserAction

    ### Platforms affected
    - iOS
    ### What does this PR do?
    This PR does some magic to allow `.focus()` to bring up the keyboard in WKWebView. I read
about this approach in a few places and saw [this commit](
in another plugin. From what I understand, its basically accessing a private method in WKWebView.
    ### What testing has been done on this change?
    Using it on my iPhone 7 and in the Simulator and it definitely works :) I'm not a native
developer so I could use some guidance getting this PR to the point where its mergeable. But
its definitely useful and absolutely necessary for [the app I'm building](
    ### Checklist
    - [ ] [Reported an issue]( in the JIRA
    - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.

You can merge this pull request into a Git repository by running:

    $ git pull master

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #37
commit e994874583d7e5f4ae1713643dbd8e01c60a0a03
Author: Chet Corcos <>
Date:   2017-06-09T22:42:25Z

    Patch KeyboardDisplayRequiresUserAction


> autofocus doesn't work with WKWebView engine plugin
> ---------------------------------------------------
>                 Key: CB-10376
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-wkwebview-engine
>    Affects Versions: 5.4.1
>         Environment: Tested on iPhone 6 plus and iPhone 5S both running iOS 9.2 
>            Reporter: David Douglas
>            Assignee: Shazron Abdullah
>            Priority: Minor
>              Labels: iOS, triaged
> When using WKWebView engine the iOS Soft Keyboard fails to automatically open when the
'autofocus' attribute is set.
> How to recreate:
> 1. Add platform and keyboard plugin
> {code}
> cordova platform add ios@4.0.1
> cordova plugin add cordova-plugin-keyboard@1.1.3 --save
> {code}
> 2. Update iOS keyboard to enable focus commands in 'config.xml':
> {code}
> <preference name="KeyboardDisplayRequiresUserAction" value="false" />
> {code}
> 3. Add textarea to test with autofocus attribute.
> {code}
> <textarea placeholder="Edit text" autofocus></textarea>
> {code}
> (Note: Before adding the WKWebView engine plugin the UIWebView will automatically open
the Soft Keyboard.)
> 4. Add the WKWebView engine plugin
> {code}
> cordova plugin add cordova-plugin-wkwebview-engine@1.0.1 --save
> {code}
> What happens:
> Nothing.
> What should happen:
> The soft keyboard should open automatically (the same a UIWebView)

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message