Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
HTMLEditor
replace collapsible ASCII white-space with an NBSP …
…if it's visible by a following <br> but it's removed This is a hack until bug 503838 is fixed. The other browsers puts an NBSP for the last ASCII white-space immediately before a block boundary to make it visible. However, we currently need to keep using an ASCII white-space as-is with putting a padding `<br>` element. However, web apps may delete the `<br>` for some reasons without maintaining the preceding collapsible white-space visibility since it's not required in the other browsers. Therefore, this patch replaces the white-spaces only when we meet such situation. Of course, this breaks the undo stack, but touching the DOM anyway causes breaking the undo stack. Thus, we can trust the web app as that it manages their on undo stack. Differential Revision: https://phabricator.services.mozilla.com/D233472 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1940278 gecko-commit: 020e3aecfaaa47b5ed8497bcc9572d70a9b5e549 gecko-reviewers: m_kato
- Loading branch information