当前位置:网站首页>Conflict resolution of onblur and onchange
Conflict resolution of onblur and onchange
2022-07-24 14:44:00 【weixin_ forty-six million seven hundred and eighty-seven thousa】
brief introduction

Pictured above , I want to click xxx or yyy Turn off the pop-up layer , Click on dom Other elements on the pop-up layer are also turned off
So I listened xxx and yyy Elemental onClick Events and input Elemental onBlur event
But when I click xxx or yyy when onBlur The event will execute first , Lead to xxx or yyy Of onClick Events are not executed directly
bug reason
onblur Events will be better than onclick Events are executed first
Solution
- hold onblur The code on the event is changed to asynchronous form , For example, add setTimeout
- No monitoring onClick Events but monitoring onMouseDown Event so that your event will be executed the moment you press the mouse
边栏推荐
- 【机器学习】之 主成分分析PCA
- VSCode如何调试Nodejs
- Meaning of 7 parameters of thread pool
- 不要灰心,大名鼎鼎的YOLO、PageRank影响力爆棚的研究,曾被CS顶会拒稿
- 基于ABP实现DDD--实体创建和更新
- [matlab] matlab drawing Series II 1. Cell and array conversion 2. Attribute cell 3. delete Nan value 4. Merge multiple figs into the same Fig 5. Merge multiple figs into the same axes
- Self join usage of SQL
- Rasa 3.x learning series -rasa [3.2.4] - 2022-07-21 new release
- [oauth2] II. Authorization method of oauth2
- The sliding window of Li Kou "step by step" (209. The smallest sub array, 904. Fruit baskets)
猜你喜欢

Maotai ice cream "bucked the trend" and became popular, but its cross-border meaning was not "selling ice cream"

Beijing all in one card listed and sold 68.45% of its equity at 352.888529 million yuan, with a premium rate of 84%

Don't lose heart. The famous research on the explosive influence of Yolo and PageRank has been rejected by the CS summit

LeetCode高频题56. 合并区间,将重叠的区间合并为一个区间,包含所有区间

正则表达和绕过案例

2022年IAA行业品类发展洞察系列报告·第二期

Jmmert aggregation test report

Similarities and differences between nor flash and NAND flash

After reading this article, I found that my test cases were written in garbage
![Rasa 3.x 学习系列-Rasa [3.2.4] - 2022-07-21 新版本发布](/img/1e/27f107d514ded6641410cc5a45764b.png)
Rasa 3.x 学习系列-Rasa [3.2.4] - 2022-07-21 新版本发布
随机推荐
threw exception [Circular view path [index]: would dispatch back to the current handler URL [/index]
Ztree tree Metro style mouse through the display user-defined controls add, edit, delete, down, up operations
Video game design report template and
Dameng real-time active and standby cluster construction
Chiitoitsu
【MATLAB】MATLAB画图系列二 1.元胞与数组转化 2.属性元胞 3.删除nan值 4.合并多fig为同一fig 5.合并多fig至同一axes
对话框管理器第二章:创建框架窗口
Similarities and differences between nor flash and NAND flash
Tensorflow framework of deep learning realizes vgg/rnn network / verification code generation and recognition / text classification
VSCode如何调试Nodejs
【NLP】下一站,Embodied AI
解决 uni-starter 使用本地函数可以登录微信 但是使用云函数登录失败
Decrypt "sea Lotus" organization (domain control detection and defense)
Solve the problem that uni starter can log in to wechat with local functions, but fails to log in with cloud functions
北京一卡通以35288.8529万元挂牌出让68.45%股权,溢价率为84%
异或程序
记不住正则表达式?这里我整理了99个常用正则
PIP source switching
SQL Server syntax - create database
pytorch with torch.no_grad