当前位置:网站首页>Input input box cursor automatically jumps to the last bug after the previous input
Input input box cursor automatically jumps to the last bug after the previous input
2022-08-01 03:18:00 【Standing on the 28th floor listening to the wind】
Component library: tea-component
Technical framework: umi, react, react-hook-form
Today's bug, the cursor of the input box automatically jumps to the back after inputting at the front
Before typing
After input
When the triggering event is different, the other conditions are the same
// onChange will cause this bug {handleChangeCache(v, 'name', true);}}maxLength={30}disabled={cacheEventInfo?.isDistabled}autoComplete="off"placeholder={intl('name')}/>// onInput will not have this bug {handleChangeCache((v?.target as any)?.value, 'name', true);}}maxLength={30}disabled={cacheEventInfo?.isDistabled}autoComplete="off"placeholder={intl('name')}/>
The reason for this bug is guessed that the tea-component component encapsulates the onChange component once, but does not encapsulate the onInput component.
The specific reasons are welcome to give pointers
Solution: Change the onChange event to onInput
边栏推荐
- 彻底关闭Chrome浏览器更新及右上角的更新提示
- ARM 交叉编译
- IDEA modifies the annotation font
- Summary of JVM interview questions (continuously updated)
- IDEA 找不到或无法加载主类 或 Module “*“ must not contain source root “*“ The root already belongs to module “*“
- Input输入框光标在前输入后自动跳到最后面的bug
- 这个地图绘制工具太赞了,推荐~~
- Parse the bootargs from the device tree (dtb format data)
- C string array reverse
- 【 Make YOLO Great Again 】 YOLOv1 v7 full range with large parsing (Neck)
猜你喜欢
JS new fun(); 类与实例 JS基于对象语言 只能通过书写构造函数充当类
HCIP(15)
opencv 缩小放大用哪种插值更好??
每周小结(*67):为什么不敢发表观点
The fledgling Xiao Li's 113th blog project notes: Wisdom cloud smart flower watering device combat (2) - basic Demo implementation
How is the tree structure of the device tree reflected?
预言机简介
[Search topic] After reading the inevitable BFS solution to the shortest path problem
【元胞自动机】基于matlab界面聚合元胞自动机模拟【含Matlab源码 2004期】
彻底关闭Chrome浏览器更新及右上角的更新提示
随机推荐
MYSQL Keyword Explain Analysis
Dart 命名参数语法
button去除黑框
内核的解压缩过程详解
MySQL modifies SQL statements to optimize performance
Basic use of vim - command mode
《少年派2》:新男友竟脚踩两只船,林妙妙与钱三一感情回温
Soft Exam Senior System Architect Series: Basic Knowledge of Information Systems
MYSQL logical architecture
HCIP (14)
Browser download shortcut to desktop (PWA)
项目越写越大,我是这样做拆分的
Introduction to Oracle
MYSQL Index Analysis
win10 fixed local IP
pdb药物综合数据库
如何下载Keil包
second uncle
Elastic Stack的介绍
Four implementations of
batch insert: have you really got it?