diff --git a/mail/base/modules/quickFilterManager.js b/mail/base/modules/quickFilterManager.js index 377bd8e805..106d9d222b 100644 --- a/mail/base/modules/quickFilterManager.js +++ b/mail/base/modules/quickFilterManager.js @@ -815,8 +815,8 @@ let TagFacetingFilter = { * We need to clone our state if it's an object to avoid bad sharing. */ propagateState: function(aOld, aSticky) { - // stay disabled when disabled - if (aOld == null) + // stay disabled when disabled, get disabled when not sticky + if (aOld == null || !aSticky) return null; if (this.isSimple(aOld)) return aOld ? true : false; // could be an object, need to convert. diff --git a/mail/test/mozmill/quick-filter-bar/test-sticky-filter-logic.js b/mail/test/mozmill/quick-filter-bar/test-sticky-filter-logic.js index 67c434a04a..c00b2f8c09 100644 --- a/mail/test/mozmill/quick-filter-bar/test-sticky-filter-logic.js +++ b/mail/test/mozmill/quick-filter-bar/test-sticky-filter-logic.js @@ -127,6 +127,12 @@ function test_sticky_tags() { be_in_folder(folderOne); assert_tag_constraints_visible(tagA, tagC); assert_messages_in_view([setTagA1]); + + // -- if we turn off sticky, make sure that things clear when we change + // folders. (we had a bug with this before.) + toggle_boolean_constraints("sticky"); + be_in_folder(folderTwo); + assert_constraints_expressed({}); } /**