首页 > 解决方案 > 带有 contenteditable 的 Chrome 错误和带有 display:flex 的列表

问题描述

在这个片段中,使用 contenteditable 和一个带有 的列表display:flex,会导致一个奇怪的错误:添加两个新行后,所有内容都消失了。它不会发生在其他浏览器中。

<html>
<head>
</head>
<body contenteditable>
 <ol>
    <li style="display:flex">Row1</li>
    <li style="display:flex">Row2</li>
    <li style="display:flex">Row3 (type enter TWICE after this)</li>
</ol>
</body>
</html>

示例:https ://jsfiddle.net/7sLn16mw

任何想法?

标签: htmlgoogle-chromeflexboxcontenteditable

解决方案


这被 Chromium 开发团队认为是错误:

https://bugs.chromium.org/p/chromium/issues/detail?id=1038520

在 Chrome 81 中修复


推荐阅读