apache / cordova-android

Apache Cordova Android
https://cordova.apache.org/
Apache License 2.0
3.59k stars 1.52k forks source link

The oninput is not working in android 13(api31) but is ok in android 10(api29) #1608

Closed 75341704 closed 9 months ago

75341704 commented 1 year ago

Bug Report

Problem

The oninput is not working in android 13(api31) but is ok in android 10(api29)

What is expected to happen?

The oninput is fired when the user types characters on the keyboard

What does actually happen?

The oninput is not working in android 13(api 31 right side) but is ok in android 10 api29(left side) (The oninput is working in android 13(api 31) only when user press the content in the keyboard) a

Chrome browser for web page The oninput is working in both android 13(api 31 right side) and android 10 api29(left side) chrome3

Information

Command or Code

Environment, Platform, Device

"cordova-android": "^8.1.0",

Version information

9.0.0 (cordova-lib@9.0.1)

Checklist

breautek commented 11 months ago

"cordova-android": "^8.1.0",

Likely unrelated but this isn't a supported version. The latest version is cordova-android@12 which is necessary for API 33 support, a requirement by Google Play store starting in August.

9.0.0 (cordova-lib@9.0.1)

Ditto, which also has a 12.0.0 release.

The oninput is not working in android 13(api 31 right side) but is ok in android 10 api29(left side) (The oninput is working in android 13(api 31) only when user press the content in the keyboard)

The difference here is likely webview versions. AOSP emulators comes with a factory install of the OS which will include some webview version often dated. In this case perhaps you're just running a webview version that has a bug with oninput. Cordova doesn't implement any DOM features, that's entirely driven by the underlying system webview.

You'll need to be using a Google Play emulator image to do this, but you can upgrade the webview by logging into Google Play and doing the standard android updates. Android System Webview should be a package that can be updated.

Let me know if this helps.

75341704 commented 9 months ago

I solved this problem.

In the vue, @input trigger the process of the associating input. The @keydown is used instead of @input. The problem is gone.