diff --git a/editor/libeditor/HTMLEditSubActionHandler.cpp b/editor/libeditor/HTMLEditSubActionHandler.cpp index b28dfb632af2..b62dde653854 100644 --- a/editor/libeditor/HTMLEditSubActionHandler.cpp +++ b/editor/libeditor/HTMLEditSubActionHandler.cpp @@ -12042,7 +12042,9 @@ HTMLEditor::InsertPaddingBRElementIfNeeded( HTMLEditUtils::IsInlineContent( *nextVisibleThing.ElementPtr(), BlockInlineCheck::UseHTMLDefaultStyle)) { - return EditorDOMPoint::AtEndOf(*nextVisibleThing.ElementPtr()); + return nextVisibleThing.ReachedCurrentBlockBoundary() + ? EditorDOMPoint::AtEndOf(*nextVisibleThing.ElementPtr()) + : EditorDOMPoint(nextVisibleThing.ElementPtr()); } } return HTMLEditUtils::LineRequiresPaddingLineBreakToBeVisible(aPoint, diff --git a/editor/libeditor/tests/mochitest.toml b/editor/libeditor/tests/mochitest.toml index 42967ab3546c..25597ff5c258 100644 --- a/editor/libeditor/tests/mochitest.toml +++ b/editor/libeditor/tests/mochitest.toml @@ -476,6 +476,9 @@ skip-if = ["display == 'wayland'"] # Bug 1935188 ["test_label_contenteditable.html"] +["test_mailcite_backspace_at_end_of_inline_reply.html"] +skip-if = ["xorigin"] # Testing internal API for comm-central + ["test_mailcite_keep_trailing_br_after_delete.html"] skip-if = ["xorigin"] # Testing internal API for comm-central diff --git a/editor/libeditor/tests/test_mailcite_backspace_at_end_of_inline_reply.html b/editor/libeditor/tests/test_mailcite_backspace_at_end_of_inline_reply.html new file mode 100644 index 000000000000..2ee315a69595 --- /dev/null +++ b/editor/libeditor/tests/test_mailcite_backspace_at_end_of_inline_reply.html @@ -0,0 +1,88 @@ + + +
+ +