diff --git a/mozilla/mail/base/content/mailWindowOverlay.js b/mozilla/mail/base/content/mailWindowOverlay.js index cbc98f72e0d..ce40f388dbc 100644 --- a/mozilla/mail/base/content/mailWindowOverlay.js +++ b/mozilla/mail/base/content/mailWindowOverlay.js @@ -2208,6 +2208,12 @@ function OnMsgLoaded(aUrl) if (!folder || !msgURI) return; + // If we are in the middle of a delete or move operation, make sure that + // if the user clicks on another message then that message stays selected + // and the selection does not "snap back" to the message chosen by + // SetNextMessageAfterDelete() when the operation completes (bug 243532). + gNextMessageViewIndexAfterDelete = -2; + if (!(/type=x-message-display/.test(msgURI))) msgHdr = messenger.messageServiceFromURI(msgURI).messageURIToMsgHdr(msgURI);