From d5d9b1ffeb165a6b6c6203bb580cf15aa07dddc7 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 11 Sep 2009 21:03:54 +0000 Subject: [PATCH] Make os_disableSuggestionsOn() work also when called before mwsuggest.js has even done its initialization --- includes/DefaultSettings.php | 2 +- skins/common/mwsuggest.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 2a85f4e7d2..dae79e003f 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1591,7 +1591,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '239'; +$wgStyleVersion = '240'; # Server-side caching: diff --git a/skins/common/mwsuggest.js b/skins/common/mwsuggest.js index 77792b0616..57844fffce 100644 --- a/skins/common/mwsuggest.js +++ b/skins/common/mwsuggest.js @@ -840,6 +840,11 @@ function os_disableSuggestionsOn(inputId){ // remove descriptor os_map[inputId] = null; } + + // Remove the element from the os_autoload_* arrays + var index = os_autoload_inputs.indexOf(inputId); + if ( index >= 0 ) + os_autoload_inputs[index] = os_autoload_forms[index] = ''; } /** Initialization, call upon page onload */ -- 2.20.1