Closed Bug 1792652 Opened 2 years ago Closed 2 years ago

May fail to move selected content to absolutely positioned `<div>`

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox-esr102 --- wontfix
firefox105 --- wontfix
firefox106 --- wontfix
firefox107 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Regression)

Details

(Keywords: regression)

This is a regression of bug 1762115, but I'm not sure how did I take this mistake...
https://searchfox.org/mozilla-central/diff/974fe7d420a13b04461ee9b0a571e0bf08847bc4/editor/libeditor/HTMLEditSubActionHandler.cpp#10130

          nsAtom* ULOrOLOrDLTagName =
              atContent.GetContainer()->NodeInfo()->NameAtom();
          if (targetDivElement) {
            // XXX Do we need to split the container? Since we'll append new
            //     element at end of the <div> element.
            const SplitNodeResult splitNodeResult =
                MaybeSplitAncestorsForInsertWithTransaction(
                    MOZ_KnownLive(*ULOrOLOrDLTagName), atContent);
-           if (splitNodeResult.isErr()) {
+           if (splitNodeResult.isOk()) {
              NS_WARNING(
                  "HTMLEditor::MaybeSplitAncestorsForInsertWithTransaction() "
                  "failed");
              return splitNodeResult.unwrapErr();
            }

Set release status flags based on info from the regressing bug 1762115

Oh, the path is used only by SeaMonkey and looks like that there is no plan to ship new stable branch with ESR102.

I think that it's enough to be fixed in bug 1792641 which touches all SplitNodeResult users (I found this bug when I was working on it).

Depends on: 1792641
Depends on: 1792642
No longer depends on: 1792641

Fixed by the landing of bug 1792641.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
You need to log in before you can comment on or make changes to this bug.