voidlabs / mosaico

Mosaico - Responsive Email Template Editor
https://mosaico.io
GNU General Public License v3.0
1.71k stars 501 forks source link

Unexpected empty line at the end of editable contents in Chrome 95+ #678

Closed bago closed 1 year ago

bago commented 1 year ago

We found a weird bug introduced by chromium in version 95. I submitted the bug to chromium and has already been acknowledged as a regression: https://bugs.chromium.org/p/chromium/issues/detail?id=1418412

The issue appears when we use an absolutely positioned ":after" content in contenteditable elements. Unfortunately we use both :before and :after pseudoelements to draw boxes about editable/selected editable items, but maybe we could refactor the code so to avoid hitting the Chrome bug, as we have no idea about the bugfix ETA.