当前位置:网站首页>Conflict between blur event and click event in input box
Conflict between blur event and click event in input box
2022-07-27 18:38:00 【mr_ cmx】
This phenomenon occurred several times when I was writing a project , But generally, I didn't react , Thought that the code was written incorrectly and there was no trigger method .
For example, the following , This is a previous one vue Problems with the project :
When printing, I found blur Method executed , But the click event of the list is not executed .
reason : In fact, this is the issue of execution priority between events ,blur The priority ratio click high , therefore blur The event executes first and hides the list , The list does not trigger click Event
resolvent :
1、 The priority of other events can be higher than blur High events
2、 Use setTimeout Time delayer
hiddenList(){
setTimeout(() => {
this.isshowList=false
}, 200);
},
200 Milliseconds is a more appropriate value after debugging , If the click event is too small, it may not be executed sometimes , The effect of a large page is poor
边栏推荐
- Zhanrui fresh seedlings: enable full scene applications, and massive data needs the integration of AI and IOT
- Deep learning: Gan case exercise -minst handwritten digits
- 「MySQL那些事」一文详解索引原理
- [MIT 6.S081] Lec 5: Calling conventions and stack frames RISC-V 笔记
- 2021.7.13笔记 子查询
- 2021.7.28 notes
- 2021.8.1笔记 DBA
- @Datetimeformat received less than minutes and seconds, conversion times type exception
- 2021.7.31笔记 视图
- File path read
猜你喜欢

Dynamic linked list 4 one-way circular linked list (loopsingle Implementation)
![[MIT 6.S081] Lab 3: page tables](/img/ea/94cdb4379733994adf3aa31cf2e826.png)
[MIT 6.S081] Lab 3: page tables

2021.7.17 notes MySQL other commands

MySQL学习 Day1 DDL、DML、DQL基础查询

C杂讲 链表初讲
![[MIT 6.S081] Lab 7: Multithreading](/img/f4/26e513fb8678a88cfba29c1a636b37.png)
[MIT 6.S081] Lab 7: Multithreading

Nowcoder (5 choices)

2021.7.12 internal and external connection of notes

2021.7.13笔记 子查询

2021.7.22 note constraints
随机推荐
@Datetimeformat received less than minutes and seconds, conversion times type exception
[MIT 6.S081] Lec 5: Calling conventions and stack frames RISC-V 笔记
常用词词性表
Graphical interface programming
[MIT 6.S081] Lab 4: traps
[MIT 6.S081] Lab 10: mmap
uniapp 在app端page选择器没有效果
输入框blur事件与click事件冲突问题
2021.7.31笔记 视图
Glory and Xiaomi reported on the double 11: they all called themselves champions
RSA encryption and decryption (compatible with wechat applet environment)
[mit 6.s081] LEC 4: page tables notes
Intel releases a new generation of movidius Vpu: 10 times higher performance and 30W power consumption
[MIT 6.S081] Lec 1: Introduction and examples 笔记
Complete set of machine learning classification task effect evaluation indicators (including ROC and AUC)
Chained storage structure of dynamic linked list 3 queue (linkedqueue Implementation)
Machine learning -- error caused by only one kind of label data in SVM training set
Idea packaging war package and war package location
[MIT 6.S081] Lab 3: page tables
Binary tree concept