Closed Bug 1861886 Opened 11 months ago Closed 10 months ago

POP3: When downloading headers only, the option "Close message window/tab on move or delete" causes the window/tab to be closed when "Download the rest of the message" is clicked

Categories

(Thunderbird :: Message Reader UI, defect)

Thunderbird 115
defect

Tracking

(thunderbird_esr115? fixed, thunderbird120 wontfix, thunderbird122? affected)

RESOLVED FIXED
122 Branch
Tracking Status
thunderbird_esr115 ? fixed
thunderbird120 --- wontfix
thunderbird122 ? affected

People

(Reporter: betterbird.project+11, Assigned: welpy-cw)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 3 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 Edg/118.0.2088.76

Steps to reproduce:

POP3: When downloading headers only, the option "Close message window/tab on move or delete" causes the window/tab to be closed when "Download the rest of the message" is clicked:

STR:
Select option: "Close message window/tab on move or delete"
Select POP3 account option to download headers only.
Open message in windows/tab and click "Download the rest of the message".

Actual results:

Closes windows/tab.

Expected results:

Should download message and show it in window/tab.

Works in 102, seems to be caused by Supernova.

Assignee: nobody → h.w.forms
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
No longer regressed by: pop3-js
Target Milestone: --- → 121 Branch

Thanks for the fix. It fixes the reported problem, but it breaks the message list. The original message is doubled up and when clicking the two messages, one turns into a message with empty subject and date "1 Jan 1970". This looks very weird. We think that the fix shouldn't be made in the backend but rather the frontend shouldn't close the message window/tab when getting the rest of the message.

Attachment #9360983 - Attachment is obsolete: true

102 tracked a _deleteInProgress:
https://searchfox.org/comm-esr102/rev/e93a5d1c08d70a159a04d1b8cb1e31953889616c/mail/base/content/messageDisplay.js#559
https://searchfox.org/comm-esr102/rev/e93a5d1c08d70a159a04d1b8cb1e31953889616c/mail/base/content/messageWindow.js#307
This was set in hintAboutToDeleteMessages() which was called in all the functions that led to "real" message deletion:
https://searchfox.org/comm-esr102/search?q=hintAboutToDeleteMessages&redirect=false

Now the window/tab is just closed even for "non delete" actions which trigger onMessagesRemoved():
https://searchfox.org/comm-central/rev/532e9eceb50e249c9ed0ba447ece29e50fb62846/mail/base/content/mailCommon.js#1075

One way to fix the bug would be to track "real" deletions again and not to close the window/tab for "non delete" removals. A more hacky solution would be to temporarily clear the pref for the call of DeleteHeader():
https://searchfox.org/comm-central/rev/532e9eceb50e249c9ed0ba447ece29e50fb62846/mailnews/local/src/nsPop3Sink.cpp#633

Perhaps we should just ignore closing for Ci.nsMsgMessageFlags.Partial?

Attachment #9361614 - Attachment description: Bug 1861886 - WIP: Don't close tab/window when completing POP3 message. r=mkmelin → Bug 1861886 - Don't close tab/window when completing POP3 message. r=mkmelin
Attachment #9361614 - Attachment is obsolete: true
Attachment #9362000 - Attachment description: WIP: Bug 1861886 - Don't close tab/window when completing POP3 message. r=mkmelin → Bug 1861886 - Don't close tab/window when completing POP3 message. r=mkmelin
Attachment #9362000 - Attachment is obsolete: true
Regressed by: tb-new-3pane
Target Milestone: 121 Branch → 122 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/d53755719d2b
Don't close tab/window when completing POP3 message. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED

good for 115?

Flags: needinfo?(h.w.forms)

Comment on attachment 9368059 [details]
Bug 1861886 - Don't close tab/window when completing POP3 message. r=mkmelin

[Approval Request Comment]
Testing completed (on c-c, etc.): c-c and beta
Risk to taking this patch (and alternatives if risky): low

Flags: needinfo?(h.w.forms)
Attachment #9368059 - Flags: approval-comm-esr115?

Comment on attachment 9368059 [details]
Bug 1861886 - Don't close tab/window when completing POP3 message. r=mkmelin

[Triage Comment]
Approved for esr115

Attachment #9368059 - Flags: approval-comm-esr115? → approval-comm-esr115+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: