Thanks to visit codestin.com
Credit goes to github.com

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

handle composition events in NgModelController textInputType #4684

Closed
@clkao

Description

@clkao

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions