From 9775f9ddb24e77bc871e2007b446a0e5d2684f47 Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Tue, 21 Nov 2017 16:37:32 -0800 Subject: [PATCH] RCFilters: Update URL even when we skip fetching In some cases, when the selected value of the filters have not changed, we don't reload the results. However, we should still update the URL values. Change-Id: Iff81b4ca1b78848813b2eb8d55f0f5f5e614b424 --- .../src/mediawiki.rcfilters/mw.rcfilters.Controller.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js index 5386291f7c..0cec3ffe52 100644 --- a/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js +++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js @@ -400,9 +400,12 @@ * Reset to default filters */ mw.rcfilters.Controller.prototype.resetToDefaults = function () { - if ( this.applyParamChange( this._getDefaultParams() ) ) { + var params = this._getDefaultParams(); + if ( this.applyParamChange( params ) ) { // Only update the changes list if there was a change to actual filters this.updateChangesList(); + } else { + this.uriProcessor.updateURL( params ); } }; @@ -425,6 +428,8 @@ if ( this.applyParamChange( {} ) ) { // Only update the changes list if there was a change to actual filters this.updateChangesList(); + } else { + this.uriProcessor.updateURL(); } if ( highlightedFilterNames ) { @@ -712,6 +717,8 @@ if ( this.applyParamChange( params ) ) { // Update changes list only if there was a difference in filter selection this.updateChangesList(); + } else { + this.uriProcessor.updateURL( params ); } // Log filter grouping -- 2.20.1