You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by ccorcos <gi...@git.apache.org> on 2017/06/09 22:56:24 UTC

[GitHub] cordova-plugin-wkwebview-engine pull request #37: CB-10376: (ios) Fix bug wh...

GitHub user ccorcos opened a pull request:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37

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

    ### 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](https://github.com/Telerik-Verified-Plugins/WKWebView/commit/04e8296adeb61f289f9c698045c19b62d080c7e3) 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](www.notion.so).
    
    ### Checklist
    - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [ ] 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 https://github.com/ccorcos/cordova-plugin-wkwebview-engine master

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

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37.patch

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 <cc...@gmail.com>
Date:   2017-06-09T22:42:25Z

    Patch KeyboardDisplayRequiresUserAction

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by ccorcos <gi...@git.apache.org>.
Github user ccorcos commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    @shazron @stevengill any thoughts?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    Cordova CI Build has completed successfully.
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37/commits/fddccc4dce724b51aea662221150501a672e0382)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-wkwebview-engine-pr/31/)
    
     2 tests run, 0 skipped, 0 failed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by SeanHub <gi...@git.apache.org>.
Github user SeanHub commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    Given a private (unsupported) function cannot be used, does anybody know of any workarounds to force programmatic focus of an input using WKWebView?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    Cordova CI Build has one or more failures. 
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37/commits/c6e82965d20afe0733d271418b1f14ab3273d92b)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-wkwebview-engine-pr/28/)
    
     0 tests run, 0 skipped, 0 failed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by cjpearson <gi...@git.apache.org>.
Github user cjpearson commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    Since this plugin just swizzles the WKWebView class, you can make it separate plugin instead of a fork. It might make maintenance easier. Look in https://github.com/apache/cordova-plugin-wkwebview-engine/pull/30 for an example.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    Cordova CI Build has completed successfully.
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37/commits/5d2acc772d564e11b3d9c525b3be4c7ebb0936f1)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-wkwebview-engine-pr/26/)
    
     2 tests run, 0 skipped, 0 failed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine pull request #37: CB-10376, CB-12037: (ios) ...

Posted by ccorcos <gi...@git.apache.org>.
Github user ccorcos closed the pull request at:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    Cordova CI Build has completed successfully.
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37/commits/e994874583d7e5f4ae1713643dbd8e01c60a0a03)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-wkwebview-engine-pr/23/)
    
     2 tests run, 0 skipped, 0 failed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    Cordova CI Build has one or more failures. 
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37/commits/22cbc6f2379b4176bc25e2572ce6592ae646704c)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-wkwebview-engine-pr/27/)
    
     0 tests run, 0 skipped, 0 failed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by ccorcos <gi...@git.apache.org>.
Github user ccorcos commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    @SeanHub here's what I've learned so far:
    
    - you can call `.focus()` so long as its in the same tick as a user action. For example, you can call `.focus()` on an element synchronously in click event handler.
    
    - you can call `event.preventDefault()` on the mousedown event to prevent the input from being blurred
    
    Or if you want, you can use my fork and then`.focus()` just works!
    
    ```xml
    <plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/ccorcos/cordova-plugin-wkwebview-engine#e994874583d7e5f4ae1713643dbd8e01c60a0a03" />
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by onderceylan <gi...@git.apache.org>.
Github user onderceylan commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    I just created a class catalog as a cordova plugin to enable focus on WKWebView. You can install it from https://www.npmjs.com/package/cordova-plugin-wkwebview-inputfocusfix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    Cordova CI Build has completed successfully.
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37/commits/25dbc3d5019ab0f2efc3e9a41c9d6bd95c35ebdf)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-wkwebview-engine-pr/29/)
    
     2 tests run, 0 skipped, 0 failed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by ccorcos <gi...@git.apache.org>.
Github user ccorcos commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    I see. But I figured that why we test on the next iOS before it comes out.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    We appreciate the PR, but ultimately we can't accept it. Please see this thread for a similar PR that uses undocumented/private API: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/26


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-wkwebview-engine issue #37: CB-10376, CB-12037: (ios) Fix bug...

Posted by ccorcos <gi...@git.apache.org>.
Github user ccorcos commented on the issue:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/37
  
    @cjpearson really cool. I'll do that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org