From 094c30bc1ce9b21aa37762f025950b82d7c8afce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 28 Oct 2020 09:28:40 +0100 Subject: [PATCH] Fix language selection using [...] button Introduced in I740600d18859422b2f98a5ef92d0321f6e9615a2. When onSelect was called for the new language, it set dirty to true. Then the, now delayed, render function reset the dirty status to false. There is no need to set dirty to false on render, so moved it to the constructor. Change-Id: Ibfa23f545c9d358e7e03fb299c238182ea449d7c --- resources/js/ext.uls.displaysettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index f756b0e8..d675f9e2 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -110,6 +110,7 @@ this.$webfonts = null; this.$parent = $parent; this.savedRegistry = $.extend( true, {}, mw.webfonts.preferences ); + this.dirty = false; } DisplaySettings.prototype = { @@ -157,7 +158,6 @@ // might not be. this.preview( this.uiLanguage ); this.listen(); - this.dirty = false; }, prepareWebfontsCheckbox: function () {