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

ng-change / ng-keyup / $scope.$watch while building Korean characters not working #10588

@migu0

Description

@migu0

I'm building a Korean vocabulary trainer and I want to compare user input as people type.

In Korean and some other Asian languages, you build letters with multiple keyup events. In Chrome and after Angular version 1.2.1 (works fine in 1.2.1), $scope.$watch, ng-change and ng-keyup can only access typed characters once they have been fully composed and the composition of a next letter has started (or a space bar has been entered).

Here's some example code with the following, undesired result:

Input: ㄱ 
Console:
ng-keyup : undefined

Input: 가
Console:
ng-keyup : undefined

Input: 감 (character is now fully composed)
Console:
ng-keyup : undefined

Input: 감ㅅ (starting the next character, same behaviour with space bar)
Console:
ng-change : 감
ng-watch: 감 undefined
ng-keyup : 감

If you change the Angular version of the Fiddle under External Resources to https://ajax.googleapis.com/ajax/libs/angularjs/1.2.1/angular.min.js, the console will log each typed character and not only once the character has been fully composed and the next character has started.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions