Skip to content

v-model did not handle CompositionEvent on Android #7367

Closed
@LeuisKen

Description

@LeuisKen

Version

2.5.13

Reproduction link

https://codepen.io/LeuisKen/pen/ZvydmK?editors=1010

Steps to reproduce

1、Chrome 63 on Android, select the input tag;
2、Use IME, such as Google Japanese in example;
3、Inputing contents.

screenrecorder-2018-01-03-11-22-53-570

What is expected?

Update data only when compositionend event fired, according to issue:
#5158 (comment)

What is actually happening?

See the screen shot in Steps to reproduce, v-model sync the input data when compositionend not fired.


Suggestion: Replacing isAndroid check in code https://github.com/vuejs/vue/blob/dev/src/platforms/web/runtime/directives/model.js#L42 with window.CompositionEvent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions