You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/08/21 13:28:00 UTC

[GitHub] [cordova-ios] u01jmg3 opened a new issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

u01jmg3 opened a new issue #972:
URL: https://github.com/apache/cordova-ios/issues/972


   # Bug Report
   
   ## Problem
   
   I realise Cordova iOS `6.1.0` was released with its own copy of the WKWebView engine. I just wanted to know whether fixes previously included in [`cordova-plugin-wkwebview-engine`](https://github.com/apache/cordova-plugin-wkwebview-engine) for fixing input focus will be incorporated into this repo?
   
   I also realise that `KeyboardDisplayRequiresUserAction` was part of the now deprecated UIWebView and in order to get similar functionality on WKWebView requires swizzling private methods. This means any fix can break if Apple decide to change their code.
   
   ### What is expected to happen?
   
   The keyboard should show when focusing an input element.
   
   ```js
   document.querySelector('input').focus()
   ```
   
   ### What does actually happen?
   
   The keyboard does not show when focusing an input element.
   
   ## Information
   
   - `cordova-plugin-wkwebview-engine`
     - Open bug report that states that this is still a problem on iOS `12.2`
       - https://github.com/apache/cordova-plugin-wkwebview-engine/issues/86
     - Open PR providing a fix for iOS `13`
       - https://github.com/apache/cordova-plugin-wkwebview-engine/pull/122
   - `cordova-plugin-ionic-webview`
     - Another issue stating that the problem still exists on iOS `13`
       - https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/400
   
   ### Environment, Platform, Device
   
   iOS `12.4.8`
   
   ### Version information
   
   Cordova `10.0.0`
   Cordova iOS `6.1.0`
   
   ## Checklist
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] u01jmg3 commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
u01jmg3 commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-717526559


   Thank @onderceylan who put me onto the fork @adaptabi created


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] dpogue commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
dpogue commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-678311070


   > in order to get similar functionality on WKWebView requires swizzling private methods
   
   It is against Apple's rules to use private methods and might lead to apps being rejected, so we will not add any code to Cordova itself that makes use of them.
   
   It should be possible for someone to write a 3rd party plugin that provides this behaviour.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] phemets commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
phemets commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-717532150


   Thank you very much @adaptabi, @onderceylan and @u01jmg3! My users will be very happy! The app update is already done and waiting for review!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] u01jmg3 commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
u01jmg3 commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-678312982


   @dpogue: is there no other way to allow focussing to work correctly on iOS 12 and 13 without a third-party plugin? Do you know why this is broken in the first place?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] u01jmg3 edited a comment on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
u01jmg3 edited a comment on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-703262155


   > _so I think Apple indeed reconsidered what is considered good practice_
   
   But as @phemets has said, user feedback suggest this feature is missed. Are Apple correct to be dictating what our users should want? Either way, there's nothing we can do. :pensive:


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] breautek commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-703175506


   > Is there a plugin or workaround that fixes this for Cordova iOS 6+?
   > Seems like a lot of people are missing this, according to the end user feedback I get.
   
   You can try deriving from this PR https://github.com/apache/cordova-plugin-wkwebview-engine/pull/122/files
   
   But like Darryl says, you're going against what Apple believes to be correct. Afaik, you can only accomplish this by using private APIs, which is grounds for app rejection. It can also makes your code brittle as private APIs can change with no warning.
   
   > This seems contradictory when previously they offered the KeyboardDisplayRequiresUserAction option in UIWebView which allowed an app developer to control this very behaviour. 
   
   `KeyboardDisplayRequiresUserAction` is also deprecated, so I think Apple indeed reconsidered what is considered good practice.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] dpogue closed issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
dpogue closed issue #972:
URL: https://github.com/apache/cordova-ios/issues/972


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] u01jmg3 commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
u01jmg3 commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-678316090


   Thanks for the info. This seems contradictory when previously they offered the `KeyboardDisplayRequiresUserAction` option in UIWebView which allowed an app developer to control this very behaviour. 🤷‍♂️


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] phemets commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
phemets commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-703140206


   Is there a plugin or workaround that fixes this for Cordova iOS 6+? 
   Seems like a lot of people are missing this, according to the end user feedback I get.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] u01jmg3 edited a comment on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
u01jmg3 edited a comment on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-678316090


   Thanks for the info. This seems contradictory when previously they offered the `KeyboardDisplayRequiresUserAction` option in UIWebView which allowed an app developer to control this very behaviour. But I guess UIWebView is now deprecated so perhaps it is no longer considered good practice. 🤷‍♂️


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] u01jmg3 commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
u01jmg3 commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-717427293


   For iOS 13+: https://github.com/adaptabi/cordova-plugin-wkwebview-inputfocusfix


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] u01jmg3 commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
u01jmg3 commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-703262155


   > _so I think Apple indeed reconsidered what is considered good practice_
   
   But as @phemets has said, user feedback suggest this feature is missed. Are Apple correct to be dictating what our users should want? Either way, there's nothing we can do.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] dpogue commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
dpogue commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-678314353


   According to Apple's view, it's not broken. This is intentional on their part: opening the keyboard always requires a user action like clicking on the page.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] u01jmg3 edited a comment on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
u01jmg3 edited a comment on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-703262155


   > _so I think Apple indeed reconsidered what is considered good practice_
   
   But as @phemets has said, user feedback suggests this feature is missed. Are Apple correct to be dictating what our users should want? Either way, there's nothing we can do. :pensive:


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] phemets commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
phemets commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-717470553


   Amazing! Works for me! Thank you, u01jmg3!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-ios] breautek commented on issue #972: Including input focus fix from cordova-plugin-wkwebview-engine

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #972:
URL: https://github.com/apache/cordova-ios/issues/972#issuecomment-703265136


   >Are Apple correct to be dictating what our users should want?
   
   This isn't really anything new for Apple. They always valued simplistic design, which often includes removing features.
   
   The proper way to get this addressed is to get into contact with Apple and request the feature. There isn't anything that can be done from Cordova.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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