Ant Design Input/React DND-使用react-dnd时无法在Ant Design Input中移动文本指针 [英] Ant Design Input / React DND - Unable to move text pointer inside Ant Design Input when using react-dnd

查看:525
本文介绍了Ant Design Input/React DND-使用react-dnd时无法在Ant Design Input中移动文本指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个项目中,我有一个蚂蚁设计表,其中包含输入字段的行.这些行和可移动/可拖动.我正在使用react-dnd来实现这一目标.

I am working on a project where I have an Ant Design Table, containing rows of Input Fields. These rows and moveable/draggable. I am using react-dnd to achieve this.

我面临的问题是使用Firefox浏览器时,使用其他浏览器时,我无法在输入"字段中移动文本光标/指针.

The problem that I am facing is when using Firefox browser, I can not move the text cursor/pointer in the Input field, when I am using any other browser I can.

我知道并理解,很难在Input中选择文本,因为它将导致行移动.我已经找到了解决方法,即使那不是我真正的问题.

I know and understand that it is difficult to select text inside the Input because it will cause the row to move. I have already found a workaround for that, even though that is not my real problem.

这里是演示项目的链接: https://codesandbox.io/s/react-dnd-antd-input-select-issue-gy2hb

Here is a link to the demo project: https://codesandbox.io/s/react-dnd-antd-input-select-issue-gy2hb

复制步骤:

  1. 使用除Firefox以外的任何其他浏览器,尝试使用鼠标(而非箭头键)将文本光标移动到输入"字段内.结果-光标/指针将根据您单击的位置而移动.
  2. 使用Firefox尝试相同的操作.结果-不管您在输入"字段中单击的位置如何,光标/指针都不会移动.

预期结果:无论浏览器如何,光标/指针都应移动

Expected Outcome: The cursor/pointer should move regardless of the browser

在进行重要项目时,我需要在Firefox上使用它.

I need this to work on Firefox as I am working on an Important Project.

推荐答案

我遇到了同样的问题,并且此评论

I had the same issue and this comment here helped me to solve it. Hope it helps you as well.

这篇关于Ant Design Input/React DND-使用react-dnd时无法在Ant Design Input中移动文本指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆