Closed Bug 1685559 Opened 4 years ago Closed 3 years ago

Wrong message is moved when using the context menu on a message other than the current one (due to QuickFilters extension)

Categories

(Thunderbird :: Folder and Message Lists, defect)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: jesup, Unassigned)

References

Details

(Whiteboard: [addon:quickfilters])

Select a message in the list. Right-click a different message and select Move To and a destination (or Move To <> Again). The current selected message is moved, instead of the right-clicked message. Note that if you select Delete, it deletes the right-clicked message as expected.

Seems WFM on linux/trunk.

Version 78.7.0 is out. Does it still happen? In safe mode?

Flags: needinfo?(rjesup)

walt, can you reproduce?

Flags: needinfo?(wls220spring)

I can not reproduce this issue using 78.11.0 on Windows 10, or Fedora 34 Workstation.

Flags: needinfo?(wls220spring)
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(rjesup)
Resolution: --- → INCOMPLETE

Just tried it again in 78.11.0 on windows 10. Selected the bugzilla message I just got. Right-clicked a different message in the list. Selected (by moving over) Move To, the same account, Inbox, and a folder in inbox. The Selected (bugzilla) message got moved, not the one I right-clicked.

Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---

It did not reproduce in safe mode. The only addons I have are https://quickfilters.quickfolders.org/index.html and Gecko Profiler

Summary: Wrong message is moved when using the context menu on a message other than the current one → Wrong message is moved when using the context menu on a message other than the current one (due to QuickFilters extension)

Indeed, I cannot reproduce this - without quickfilters

Flags: needinfo?(axel.grude)
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → INVALID
Whiteboard: [addon:quickfilters]

(In reply to Randell Jesup [:jesup] (needinfo me) from comment #0)

Select a message in the list. Right-click a different message and select Move To and a destination (or Move To <> Again). The current selected message is moved, instead of the right-clicked message. Note that if you select Delete, it deletes the right-clicked message as expected.

when I right-click any other message it is automatically selected, but there is still a "ring" around the other message... very strange.

Flags: needinfo?(axel.grude)

quickFilters wraps the global functions MsgMoveMessage and MsgCopyMessage to record message specific information before the original functions are called. So there is some processing time by the Add-on before the copy / move is executed. I need to debug this to see why this would change the global variables

gFolderDisplay.selectedMessages
gFolderDisplay.selectedMessageUris

these should be correct at this stage.

I did more testing, so I believe the menu command that causes the move jumps to the next message immediately after issuing the MsgMoveMessage() command. This assumes that MsgMoveMessage() is (and always will be) executed synchronously and the copy operation is complete when it returns. Then it would be safe for the selection to move to the next mail in the list. I think it would have been safer to put this command on the msgsMoveCopyCompleted event instead.

I raised a issue on my github and uploaded a possible fix:
https://github.com/RealRaven2000/quickFilters/issues/68#issuecomment-881562541

You need to log in before you can comment on or make changes to this bug.