You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subsequent getHTML calls will then return <div>Some text<br></div>
This causes issues in our revision system, since it picks up changes in the html without any user input.
I believe I have pinpointed it to the fixCursor function, which makes sure all elements are selectable. It does this by appending a BR to all block elements. This should only be necessary for empty block elements.
Reproduction steps:
editor.setHTML("<div>Some text</div>")
getHTML
calls will then return<div>Some text<br></div>
This causes issues in our revision system, since it picks up changes in the html without any user input.
I believe I have pinpointed it to the
fixCursor
function, which makes sure all elements are selectable. It does this by appending aBR
to all block elements. This should only be necessary for empty block elements.https://github.com/fastmail/Squire/blob/cbd8881e78c2af0305a0b6a06cdff16c0c0b05ed/source/node/MergeSplit.ts#L40C4-L43C8
So i suggest the following change to make sure non-empty blocks are left unchanged
The text was updated successfully, but these errors were encountered: