Skip to content

升级2.6以上版本后在部分安卓机上input使用v-model的同时有对数据格式化时光标异常 #9485

Open
@matf5

Description

@matf5

Version

2.6.6

Reproduction link

https://codepen.io/matf5/project/editor/ARGnKV

computed: {
    cardNoFormat: {
      get() {
        return this.cardNo.replace(/(\d{4})(?=\d)/g, '$1 ');
      },
      set(value) {
        this.cardNo = value;
      }
    }
}

Steps to reproduce

例如输入输入62148时,数据会变为6214 8

What is expected?

光标位于8后面

What is actually happening?

有问题的安卓机如vivo,华为荣耀在部分浏览器内核下(如uc)光标会卡在8前面

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