From cca4c120dde3e5a4990e4f5a381f3e82db415515 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 4 Nov 2008 07:24:07 +0000 Subject: [PATCH] user selection: MDL-17073 add options to control the search in a collapsible region - fix the preserve-selected option. --- user/selector/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user/selector/script.js b/user/selector/script.js index aed9acd5f3..529960d121 100644 --- a/user/selector/script.js +++ b/user/selector/script.js @@ -378,7 +378,7 @@ user_selector.prototype.output_options = function(data) { var options = optgroup.getElementsByTagName('option'); while (options.length > 0) { var option = options[0]; - if (preserveselected && option.selected) { + if (option.selected) { var optiontext = option.innerText || option.textContent this.selected[option.value] = { id: option.value, name: optiontext, disabled: option.disabled }; } @@ -416,7 +416,7 @@ user_selector.prototype.output_options = function(data) { areprevselected = true; break; } - if (areprevselected) { + if (preserveselected && areprevselected) { this.output_group(this.insert_search_into_str(this.strprevselected, this.lastsearch), this.selected, true); } this.selected = null; -- 2.39.5