CSS网格元素内的可满足,似乎是Google Chrome中的错误
Google Chrome中似乎有一个错误(至少在FF中),当单击元素以外时,在网格中,在网格中会产生可符合性的
元素。
是否可以快速修复它,不等待将其修复在Chrome中?
以下是display:grid; grid;
的示例,如果用户任意单击在页面(在可满足元素之外),然后被激活(以chrome为单位)。
<div style="width: 300px; margin: 0 auto; display: grid; overflow: hidden; border: 1px solid black;">
<div contenteditable="true" style="">aaa</div>
</div>
没有网格:
<div style="width: 300px; margin: 0 auto; overflow: hidden; border: 1px solid black;">
<div contenteditable="true" style="">aaa</div>
</div>
我已经尝试了溢出:隐藏
,边界,桨等等。无用。
谢谢。
There seems to be a bug in Google Chrome at least (not in FF), which makes a contenteditable
element inside a grid to be activated, when a click occurs outside of the element.
Is it possible to fix it quick, w/o waiting this to be fixed in Chrome?
Here is an example with display: grid;
, if the user clicks arbitrarily on the page (outside of the contenteditable element), then it gets activated (in Chrome).
<div style="width: 300px; margin: 0 auto; display: grid; overflow: hidden; border: 1px solid black;">
<div contenteditable="true" style="">aaa</div>
</div>
No grid:
<div style="width: 300px; margin: 0 auto; overflow: hidden; border: 1px solid black;">
<div contenteditable="true" style="">aaa</div>
</div>
I've tried overflow: hidden
, borders, paddings etc. No avail.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最快的解决方案似乎是在可满足的元素中添加包装器,以使网格电池元素不满意:
The quickest solution seems to be to add a wrapper to the contenteditable element, so that a grid-cell element is not contenteditable: