Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Chrome on Android doesn't update input data bindings on keyboard input properly #5373

Closed
lingz opened this issue Dec 11, 2013 · 2 comments
Closed

Comments

@lingz
Copy link

lingz commented Dec 11, 2013

Using Chrome on Android 4.2.1 (Nexus 4), I noticed a few bugs with regards to the live data binding to an input field:
#1) First ng-keyup and ng-keydown always return keyCode of 0. ng-keypress doesn't work at all on android.
#2) ng-model databinding doesn't update the data until either the keyboard is dropped, or the space or backspace key is pressed. Other keys don't update the data model.
#3) Bug #2 does not occur on other browsers (dolphin, firefox), but it does happen on other keyboards (swiftkey)

I created a bit of a hacky workaround, where I manually rebind the data on every ng-keyup.

link: (scope, element, attrs) ->
  scope.keyup = ($event) ->
    scope.fieldInfo.value = element.find("input").val()

Though, it can be easily tested & reproduced bug. Go on the angular site with a Nexus 4, and try the basic hello world example, and you'll see the data not updating until the keyboard is released / backspace or spacebar is pressed.

@caitp
Copy link
Contributor

caitp commented Dec 11, 2013

Related to #5308 (regarding the model updates).

So we know why the model updates aren't happening, but it's not clear that there's much we can do about it, without alienating people who require complex IMEs.

I think the issue has been opened at least a few times on chromium/blink.

Regarding the event.which / event.keyCode being set to 0, unfortunately this is again because of what the IME is doing, we unfortunately don't have any way to control that as far as I'm aware :(

@Narretz
Copy link
Contributor

Narretz commented Dec 18, 2013

"fixed" by #5464 @petebacondarwin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants