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

Doesn't fire "input" event on IE10 with Japanese IME is enabled #6058

Closed
tsuyoshizawa opened this issue Jan 30, 2014 · 13 comments
Closed

Doesn't fire "input" event on IE10 with Japanese IME is enabled #6058

tsuyoshizawa opened this issue Jan 30, 2014 · 13 comments

Comments

@tsuyoshizawa
Copy link
Contributor

On IE10, "input" event doesn't fire while typing by Japanese, so model isn't bound application can't get the value. (I use ng-model on input text element.)

https://github.com/angular/angular.js/blob/v1.2.10/src/ng/directive/input.js#L447

@caitp
Copy link
Contributor

caitp commented Jan 30, 2014

Does it fire compositionend? I wonder if it would make sense to trigger the listener on compositionend.

Do me a favour and try adding a call to the listener function at the end of this function

@btford
Copy link
Contributor

btford commented Jan 31, 2014

I can take this since I have a machine with IE10 and MS's Japanese IME.

@ghost ghost assigned btford Jan 31, 2014
@tsuyoshizawa
Copy link
Contributor Author

@caitp Yes, compositionend works without incident.

The event called after typed return key (String is established) but listener function isn't called so it seems that ctrl.$setViewValue doesn't executed.

@caitp
Copy link
Contributor

caitp commented Jan 31, 2014

What I mean is, does calling the listener function on compositionend solve this for you? IIRC we were doing this a while ago, or maybe that change never merged, but it seemed to fix some other similar issues on android. I am sure we had a good reason not to do it, but it's a possible solution.

@clkao wrote the other patches regarding composition and probably knows more about it than me

@tsuyoshizawa
Copy link
Contributor Author

@caitp Yes, I will be solved.

The listener function would be called twice only just adding if browser is supporting "input" event except IE10 on currency code. Of course, I think that fix is not problem because already comparing old and new string.

@clkao
Copy link
Contributor

clkao commented Jan 31, 2014

@tsuyoshizawa can you create an PR calling listener on compositionend? I'll test zh IME environments

@caitp
Copy link
Contributor

caitp commented Jan 31, 2014

#5433 was doing exactly this, but I can't recall why it was decided against. Should be easy to rebase the patch and try it, though

@clkao
Copy link
Contributor

clkao commented Jan 31, 2014

@caitp oh we probably decided it was just chrome on android being broken, as people also wanted the model updated during autocomplate-enabled IME in english, so we went with the fix disabling it on android altogether. How that this is manifesting on IE10...

@tsuyoshizawa
Copy link
Contributor Author

The PR works well to me. Thank you.
I hope the patch will merge to master branch.

@caitp
Copy link
Contributor

caitp commented Feb 12, 2014

@tbosch has said LGTM for my PR on asana, @btford have you found any other solution for this? If not I'd like to land this tomorrow

@btford btford removed their assignment Feb 12, 2014
@btford
Copy link
Contributor

btford commented Feb 12, 2014

@caitp LGTM

@caitp caitp closed this as completed in 2b73027 Feb 13, 2014
khepin pushed a commit to khepin/angular.js that referenced this issue Feb 19, 2014
Because of a4e6d96, model is not updated on input/change between the
compositionstart and compositionend events. Unfortunately, the compositionend
event does not always happen prior to an input/change event.

This changeset calls the listener function to update the model after a
compositionend event is received.

Closes angular#6058
Closes angular#5433
@sylvhama
Copy link

(I repost my comment from the #6656)

Hello,

I am web developer in Korea and I have noticed the same issue.
I found at least 3 differents cases:
-On Chrome, when you write something inside an input with the directive ng-model, the scope won't get updated with the last caracter. It's hard to explain but in Korean (like in japanese) there is this state where you "build" your caracter. While you are in this state the scope is not updating your variable.
-On IE10 (Korean version tested only), you need to click somewhere in the DOM or press spacebar / tabulation to update the variable. It means you can for example write a big word to filter a ng-repeat list, if you don't press something it won't work.
-On IE11 (Korean version, English version is fine!), it's the worst case! if you fill an input and click an another one, the first variable binding via ng-model will stay empty.

Important fact: I made a keyup function via jQuery, it works well!

I have recorded a video to show the issue on IE11 (Korean version): https://www.screenr.com/XGcN

Plunker: http://plnkr.co/edit/WaZvP4ivhIaPxYRmKjeF?p=preview

@sylvhama
Copy link

sylvhama commented Dec 4, 2014

@Luien you must be talking about my jQuery part. You're right, my purpose was not to make a workaround, just to show how the Keyboard events differ between JQuery and AngularJS concerning Korean characters.

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

No branches or pull requests

5 participants