-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
HTMLEditor::InsertElementAtSelectionAsAction
split ancestor in…
…line elements Chrome and Safari splits ancestors when `document.execCommand("insertImage")` inserts an `<img>`, but we insert into the closest inline element. For example, ```html <b>A[]B</b> ``` Chrome and Safari make it to: ```html <b>A</b><img><b>B</b> ``` But Firefox makes it to: ```html <b>A<img>B</b> ``` I think that we should not change the behavior on Thunderbird. Therefore, the behavior is controlled with the new `options` argument and the new behavior runs only when the `HTMLEditor` works for content document and it's not caused by the XPCOM method. Differential Revision: https://phabricator.services.mozilla.com/D225037 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1923250 gecko-commit: 4d82c0995e5d5653017d08b4c101f078a165039c gecko-reviewers: m_kato
- Loading branch information
1 parent
5611c15
commit 38a8c54
Showing
1 changed file
with
43 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters