Closed Bug 1864339 Opened 26 days ago Closed 25 days ago

gDBView.hdrForFirstSelectedMessage doesn't work reliably in multi-folder views

Categories

(MailNews Core :: Database, defect)

Thunderbird 115
Desktop
Unspecified
defect

Tracking

(thunderbird_esr115? fixed, thunderbird120? wontfix)

RESOLVED FIXED
121 Branch
Tracking Status
thunderbird_esr115 ? fixed
thunderbird120 ? wontfix

People

(Reporter: welpy-cw, Assigned: welpy-cw)

References

Details

Attachments

(1 file)

Steps to reproduce:

  1. Enter a threaded multi-folder view.
  2. Select all messages of an expanded thread making sure the last single selected message (current index as indicated by dotted border) hasn't been the root message.
  3. Collapse the thread
  4. Open the context menu of that row

Actual results:

Error console shows

Uncaught : Component returned failure code: 0x80550018 [nsIMsgDBView.hdrForFirstSelectedMessage]
    isCommandEnabled chrome://messenger/content/mailCommon.js:519
    fillMailContextMenu chrome://messenger/content/mailContext.js:330
    onPopupShowing chrome://messenger/content/mailContext.js:140
    handleEvent chrome://messenger/content/mailContext.js:127
    _onContextMenu chrome://messenger/content/about3Pane.js:5022
    handleEvent chrome://messenger/content/about3Pane.js:4647

Debugging reveals nsMsgSearchDBView::GetHdrForFirstSelectedMessage failing because mTreeSelection->GetCurrentIndex returns -1.

Expected result:

nsMsgSearchDBView::GetHdrForFirstSelectedMessage should return the first selected message indepently from the current index, as nsMsgDBView::GetHdrForFirstSelectedMessagedoes.

This is also responsible for the behavior reported in https://bugzilla.mozilla.org/show_bug.cgi?id=1856266#c15.

Assignee: nobody → h.w.forms
Status: NEW → ASSIGNED
See Also: → 1856266

By the way, gDBView.hdrForFirstSelectedMessage was used very sparsely before Supernova,
see in particular get selectedMessage().

Attachment #9363172 - Attachment description: WIP: Bug 1864339 - Fix hdrForFirstSelectedMessage for multi-folder views. r=mkmelin → Bug 1864339 - Fix hdrForFirstSelectedMessage for multi-folder views. r=mkmelin
Target Milestone: --- → 121 Branch

Pushed by ikey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/1daea7f19cfd
Fix hdrForFirstSelectedMessage for multi-folder views. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
See Also: → 1865548

Good for 115?

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

Comment on attachment 9363172 [details]
Bug 1864339 - Fix hdrForFirstSelectedMessage for multi-folder views. r=mkmelin

[Triage Comment]
Approved for esr115

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