iview [Bug Report] inputNumber's default mouseup event binds preventDefault, resulting in partial selection, and then clicking on the selected area (not the other unchecked area) cannot cancel the selected state.

pxy2qtax  于 10个月前  发布在  其他
关注(0)|答案(2)|浏览(85)

Environment

官方文档

https://www.iviewui.com/components/input-number

Steps to reproduce

鼠标选中inputNumber部分区域,然后单击选中区域(不是其他没选中的区域),没法取消选中的状态

What is expected?

像原生input一样,选中部分文字后,单击选中区域会取消选中并聚焦

What is actually happening?

鼠标选中inputNumber部分区域,然后单击选中区域(不是其他没选中的区域),没有取消选中的状态并聚焦

这个应该不是使用问题吧,看了源码,input上默认了mouseup绑定了事件,然后e.preventDefault,导致的这个效果

dojqjjoe

dojqjjoe1#

Translation of this issue:

Environment

Official documents

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.

展开查看全部
fzsnzjdm

fzsnzjdm2#

3年了,还没修= =

相关问题