Closed Bug 1581337 Opened 5 years ago Closed 5 years ago

When replying to an e-mail: Deleting a character or marked area in a quote ([Del] or [Backspace]) removes the entire quote.

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 --- fixed

People

(Reporter: infofrommozilla, Assigned: masayuki)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

STR:

  • Reply to an e-mail
  • Move the cursor into the quote or select some quote
  • type [Del] or [Backspace]

Result: The whole quote will be removed.

This is a regression by:
| b60769450e9db6e7ffcf7c80efa8d037d5004b66: Bug 1574852 - part 101: Move HTMLEditRules::DidDeleteSelection() to HTMLEditor r=m_kato
| Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Sep 2019 07:27:30 +0000 - rev 492783
| Push 36567 by nerli@mozilla.com at Thu, 12 Sep 2019 21:52:31 +0000
| Bug 1574852 - part 101: Move HTMLEditRules::DidDeleteSelection() to HTMLEditor r=m_kato
|
| Differential Revision: https://phabricator.services.mozilla.com/D45295

Flags: needinfo?(masayuki)
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Component: Message Compose Window → Editor
Flags: needinfo?(masayuki)
Keywords: regression
Priority: -- → P1
Product: Thunderbird → Core

Thank you very much for reporting with the regression point! You're right. This is my simple mistake but without your investigation, I couldn't fix this so soon.

When rewriting DeleteMostAncestorMailCiteElementIfEmpty() with early-return
style, I forgot to make it do nothing when found element is empty:
https://searchfox.org/mozilla-central/rev/94e642e6036dc694b07cab895c9b5b267f0db065/editor/libeditor/HTMLEditRules.cpp#4078
This patch restores it.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/bcaada0fa740 Make `HTMLEditor::DeleteMostAncestorMailCiteElementIfEmpty()` do nothing if found mail-cite element is not empty r=m_kato
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

I confirm the bug is fixed.

Is there a non-regression test implemented?

Thanks

Thanks for testing. A test was added now, see: https://hg.mozilla.org/mozilla-central/rev/bcaada0fa740#l2.12

I go on testing. Not sure I did not speak so quickly. But I have just updated, maybe I should wait for the next build. So now if I delete a char from my own reply, ok. If I delete from the original message, it disappears. I let you informed tomorrow after the next build is available.

As far as I can see, this works now, EDIT but the behaviour of forward-deleting into a quote has changed. It seems to delete the <blockquote> element when before, it didn't.
Scrap that second part. Looks like forward delete into a quote hasn't changed. The behaviour depends on the content of the quote.

Ok the last build works. And if there is a non-reg test, great! Many thanks

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: