Environment
官方文档
Reproduction link
https://www.iviewui.com/components/input-number
Steps to reproduce
鼠标选中inputNumber部分区域,然后单击选中区域(不是其他没选中的区域),没法取消选中的状态
What is expected?
像原生input一样,选中部分文字后,单击选中区域会取消选中并聚焦
What is actually happening?
鼠标选中inputNumber部分区域,然后单击选中区域(不是其他没选中的区域),没有取消选中的状态并聚焦
这个应该不是使用问题吧,看了源码,input上默认了mouseup绑定了事件,然后e.preventDefault,导致的这个效果
2条答案
按热度按时间dojqjjoe1#
Translation of this issue:
Environment
Official documents
Reproduction link
https://www.iviewui.com/components/input-number
Steps to reproduce
The mouse can't cancel the selected state by selecting part of the inputNumber area and then clicking the selected area (not the other unchecked area).
What is expected?
Like native input, clicking the selected area after selecting some text cancels the selection and focuses
What is actually happening?
Select the inputNumber part of the area, and then click the selected area (not the other unchecked area), without canceling the selected state and focusing.
This shouldn't be a problem. Look at the source code. Input defaults to mouseup binding events, and then E. preventDefault, which results in this effect.
fzsnzjdm2#
3年了,还没修= =