-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] el-input not firing input event on android #14746
Comments
Does using native input and v-model gives the desired result. If not, we won't fix it. |
Yes it works fine with a native input, that's why I suppose the bug is related to element-ui. I checked the source code. The method |
Ok, after some debugging here is what happens on an android 9 phone with gBoard keyboard :
So clearly this is strange, as I believe I think I'll fork the project and remove composition event listeners as a quick workaround. |
The design is not to emit input event during composition. So I guess it’s likely gBoard’s design issue. We won’t change mainline code because we need to support CJK IMEs. Though you are welcomed to find a workaround that detects gBoard and hack the composition events a little bit. I would also recommend you ask gBoard team why they choose to handle English words as character compositions. |
element/packages/input/src/input.vue Line 286 in c1b869d
change this line to: if (event.isComposing) return; |
Can we assume that composing may last up to 0.6s:
The idea is to emit the event if there are no changes while composing after a certain time. Also, on my Gboard of Android, the |
Would it be better if el-input will forward the composing events to the parent, so the caller can choose what to do with his business logic? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Element UI version
2.4.11 (updating to 2.6 doesn't fix)
OS/Browsers version
Android 9 - Chrome
Vue version
2.5.16 (updating to 2.6 doesn't fix)
Reproduction Link
https://jsfiddle.net/p20gfmos/
Steps to reproduce
What is Expected?
The value of the input is immediately displayed under it in a div.
What is actually happening?
The
input
instance value is not updated on keypress. It's only updated on blur or if the space key is pressed.When debugging a bit, I realized the input event wasn't fired by element because
this.isOnComposition
is true in the keypress listener.I tried on several android phones and simulators and I can reproduce with every Android 8+ devices using gBoard. If I use another keyboard like SwiftKey, it works fine.
The text was updated successfully, but these errors were encountered: