diff --git a/mailnews/base/search/resources/content/SearchDialog.js b/mailnews/base/search/resources/content/SearchDialog.js index 333cca83260..77257b9cb55 100644 --- a/mailnews/base/search/resources/content/SearchDialog.js +++ b/mailnews/base/search/resources/content/SearchDialog.js @@ -79,6 +79,11 @@ var nsSearchResultsController = if (GetNumSelectedMessages() != 1) enabled = false; break; + case "button_delete": + // this assumes that advanced searches don't cross accounts + if (GetNumSelectedMessages() <= 0 || isNewsURI(gSearchView.getURIForViewIndex(0))) + enabled = false; + break; default: if (GetNumSelectedMessages() <= 0) enabled = false;