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 click 与 blur 事件冲突 #3405

Closed
Breezes1993 opened this issue Mar 5, 2019 · 3 comments
Closed

[Bug Report] x-input click 与 blur 事件冲突 #3405

Breezes1993 opened this issue Mar 5, 2019 · 3 comments
Milestone

Comments

@Breezes1993
Copy link

VUX version

2.9.2

OS/Browsers version

win10,chrome72.0.3626.109(F12 Pixel ios的设备没问题),node 10.8.0,

Vue version

2.5.2

Code

x-input组件的index.vue 
clear事件和onBlur事件

Steps to reproduce

npm install vue-cli -g # 如果还没安装
vue init airyland/vux2 projectPath
使用x-input,显示clear图标,输入内容,点击clear图标。

What is Expected?

会先触发onblur 之后 clear能够执行

What is actually happening?

会先触发onblur 之后 clear没有执行

@Breezes1993
Copy link
Author

vuex版本2.2.0

@Breezes1993
Copy link
Author

onBlur ($event) {
  this.setTouched()
  this.validate()
  setTimeout(() => {
    this.isFocus = false
    this.$emit('on-blur', this.currentValue, $event)
  }, 0)
}

onBlur事件加个延时,就运行正常了

@caozhong1996 caozhong1996 added this to the 2.9.5 milestone Jun 18, 2021
@caozhong1996
Copy link
Collaborator

see #3778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants