Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] x-input用mask格式化后从中间修改数据光标会跳到右边 #2810

Closed
huanmo222 opened this Issue May 29, 2018 · 6 comments

Comments

Projects
None yet
7 participants
@huanmo222
Copy link

huanmo222 commented May 29, 2018

VUX version

2.8.0

OS/Browsers version

chrome

Vue version

2.5.2

Code

        <x-input 
          title="购票卡号" 
          required
          :is-type="judgeCreditCardNo" 
          v-if="isHandFill"
          :show-clear="false" 
          placeholder="本人刷卡购票卡号" 
          :max=19  
          mask="9999 9999 9999 9999"
          v-model="FdTCase.creditCardNo"
        >
        </x-input>

Steps to reproduce

x-input用mask格式化后从中间修改数据光标会跳到右边
原始数据1234 5678:
1. 当在1-8之间的任何地方再输入一个数字, 光标就会跳到最右边.
2. 当光标定位到4后面, 删除4, 也会跳到最右边.

What is Expected?

在中间修改数据时, 光标可以定位到当前的位置.

What is actually happening?

在中间修改数据时, 光标会跳动到最右侧.

unclay added a commit that referenced this issue Jun 2, 2018

@unclay

This comment has been minimized.

Copy link
Collaborator

unclay commented Jun 2, 2018

下版本更新

@unclay unclay closed this Jun 2, 2018

@chenyimin1314

This comment has been minimized.

Copy link

chenyimin1314 commented Aug 21, 2018

我遇到一个问题 就是 x-input v-model值 ios可以拿到 安卓就获取不到 什么原因呢

@kevinchung1026

This comment has been minimized.

Copy link

kevinchung1026 commented Oct 17, 2018

我遇到一个问题 就是 x-input v-model值 ios可以拿到 安卓就获取不到 什么原因呢

我今天也遇到这个问题

@pp344

This comment has been minimized.

Copy link

pp344 commented Dec 10, 2018

我遇到一个问题 就是 x-input v-model值 ios可以拿到 安卓就获取不到 什么原因呢

今天也遇到了,只好退版本2.9.0。是number类型在安卓微信上就会出现这个问题

@hzc315579049

This comment has been minimized.

Copy link

hzc315579049 commented Dec 19, 2018

这个问题修复了..但是这个修复带来了另外一个问题: value变了之后..会因为碰了selection而自动触发input的focus事件。某些场景下很难受..

@wangatong

This comment has been minimized.

Copy link

wangatong commented Mar 12, 2019

2.9.2版本怎么还会出现光标问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.