[英]cursor (caret) is not visible in contenteditable div
When I click on a text in a contenteditable div, the cursor does not appear to move. 当我单击可编辑内容的div中的文本时,光标似乎没有移动。
once text is typed, the cursor becomes visible and text is entered in the clicked location. 键入文本后,光标变为可见,并且在单击的位置输入了文本。
its as if the cursor moves, but is not being redrawn. 就像光标移动了一样,但是没有被重绘。
I am unable to reproduce the bug in a simple jsfiddle environment. 我无法在简单的jsfiddle环境中重现该错误。
Has anyone encountered such an issue before? 有人遇到过这样的问题吗?
In the meantime I am trying to isolate the cause of the problem by removing css and javascript file references from the page. 同时,我试图通过从页面中删除css和javascript文件引用来找出问题的原因。 and reverse- starting with a blank page and adding js/css in attempt to reproduce.
然后从空白页开始反向添加js / css以尝试重现。
EDIT IN RESPONSE TO COMMENTS BELOW: 根据以下评论进行编辑:
Browser: chrome Javascript modules: jquery, jquery ui, rangy. 浏览器:Chrome浏览器的Javascript模块:jQuery的,jQuery UI的,瘦长。
I tried to remove all javascript. 我试图删除所有JavaScript。 and the bug was still there.
而且错误仍然存在。 It must be coming from the css.
它必须来自CSS。 I am trying to single out the css rules involved.
我试图找出涉及的CSS规则。 It appears to be a combination of things.
它似乎是事物的组合。 the :before psudo class (that I am using to show placeholder text in the div if it has no text) seems to be part of the problem.
:before psudo类(如果没有文本,我将用来在div中显示占位符文本)似乎是问题的一部分。
The problem was traced to css3 3d transformations on a div that is located in the background of the contenteditable element. 该问题可追溯到位于contenteditable元素背景中的div上的css3 3d转换。
Will try to place the background element in an iframe to resolve the issue. 将尝试将背景元素放置在iframe中以解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.