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 2021/07/25 04:56:18 UTC
[GitHub] [cordova-ios] nekobungi opened a new issue #1132: App is not listening any keyboard input until the screen is tapped
nekobungi opened a new issue #1132:
URL: https://github.com/apache/cordova-ios/issues/1132
# Bug Report
## Problem
Just after launch, the app will not accept any keyboard input, no matter what keybord event listeners you have added.
However, if you tap or click the screen even once, all keybord events will start to be listening.
This may not be a problem for many apps that are primarily made for the iPhone, since they mainly works with touch screens.
However, in recent years, as Apple has started to feature more keyboards for the iPad, and iOS apps are now running on Macintosh, non-touch screen based operation has become more and more important.
Unfortunately, the need to tap the screen with this bug makes it currently impossible to create an app such as utility app operated using only the keyboard, or gaming app playing via keyboard.
### What is expected to happen?
Listen to keyboard input right after app launch.
### What does actually happen?
Keyboard input will not start listening until you tap or click the screen.
## Information
<!-- Include all relevant information that might help understand and reproduce the problem -->
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
You can reproduce the problem by following these steps:
1. Create an empty HelloWorld project, add iOS platform
2. Adding to anywhere in js/index.js a keybord input event listner, such as this:
```
document.addEventListener("keydown", event => {
document.body.innerHTML = event.keyCode;
});
```
3. Build and launch the app on an iPad with keyborad connected, a Mac, or a simulator
4. Hit any key on your keyboard
5. Tap or click anywhere in the app sreen
6. Hit any key on your keyboard again
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
- iPad Pro running iPadOS15 beta3 with external keybord connected
- Apple Sillicon based Macintosh running macOS 11.5 ("iOS App On Mac" mode)
- Any iOS Simulator running iOS/iPadOS 14.5
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
- cordova: 10.0.0
- cordoav-ios: 6.2.0
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [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.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
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