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

handle composition events in NgModelController textInputType #4684

Closed
clkao opened this issue Oct 28, 2013 · 0 comments
Closed

handle composition events in NgModelController textInputType #4684

clkao opened this issue Oct 28, 2013 · 0 comments

Comments

@clkao
Copy link
Contributor

clkao commented Oct 28, 2013

Background: in CJKV environment, it is common that the users input text characters with "composition", while the intermediate state of the buffer is not part of the final text the users want.

For example, if there's a list rendered with ng-repeat and filter:search, and the search scope var is bound to an input field. When the users try to type in the search field, multiple keyup events are fired with unwanted intermediate values. Especially before the second character is typed, the intermediate chars will make the list blank and flashing, as it's unlikely to match any item with the intermediate characters.

The right way to fix this is for textInputType not to update model value between the "compositionstart" and "compositionend" events.

more about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent

clkao added a commit to clkao/angular.js that referenced this issue Oct 28, 2013
When composing text in CJKV, intermediate buffer for unfinished text should not
be updating the bound scope variables.

Closes angular#4684
@ghost ghost assigned tbosch Nov 21, 2013
@tbosch tbosch closed this as completed in a4e6d96 Nov 21, 2013
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
When composing text in CJKV, intermediate buffer for unfinished text should not
be updating the bound scope variables.

Closes angular#4684
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
When composing text in CJKV, intermediate buffer for unfinished text should not
be updating the bound scope variables.

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

Successfully merging a pull request may close this issue.

2 participants