From 12d741b8e44011394794aafde87aeac8ff50a271 Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Thu, 18 Apr 2002 22:32:25 +0000 Subject: [PATCH] fix updating of command handlers in cases where there is no selection r=ssu, sr=sspitzer 134893 git-svn-id: svn://10.0.0.236/trunk@119328 18797224-902f-48f8-a5cc-f745e15eee43 --- .../mailnews/base/resources/content/msgMail3PaneWindow.js | 7 ++++++- mozilla/mailnews/base/resources/content/threadPane.js | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js b/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js index 7105381218c..a0c8f3b02e4 100644 --- a/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js +++ b/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js @@ -52,7 +52,7 @@ var gNextMessageViewIndexAfterDelete = -2; var gCurrentlyDisplayedMessage=nsMsgViewIndex_None; var gStartFolderUri = null; var gStartMsgKey = -1; - +var gRightMouseButtonDown = false; // Global var to keep track of which row in the thread pane has been selected // This is used to make sure that the row with the currentIndex has the selection // after a Delete or Move of a message that has a row index less than currentIndex. @@ -922,7 +922,12 @@ function TreeOnMouseDown(event) // where the click happened without loading the message headers in // the Folder or Thread Pane. if (event.button == 2) + { + gRightMouseButtonDown = true; ChangeSelectionWithoutContentLoad(event, event.target.parentNode); + } + else + gRightMouseButtonDown = false; } function FolderPaneOnClick(event) diff --git a/mozilla/mailnews/base/resources/content/threadPane.js b/mozilla/mailnews/base/resources/content/threadPane.js index 392e5dbd156..b7e181d769e 100644 --- a/mozilla/mailnews/base/resources/content/threadPane.js +++ b/mozilla/mailnews/base/resources/content/threadPane.js @@ -330,8 +330,7 @@ function ThreadPaneSelectionChanged() { var treeBoxObj = GetThreadTree().treeBoxObject; var treeSelection = treeBoxObj.selection; - - if (treeSelection.isSelected(treeSelection.currentIndex)) + if (!gRightMouseButtonDown) treeBoxObj.view.selectionChanged(); }