From 4df031187f3b847efc4205f93c0db9f4e8240eb3 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 16 Sep 2014 14:47:42 -0700 Subject: [PATCH] [ticket/13069] Fix timezone location filtering. $timezone contains the original jQuery object, therefore the subsequent removal of the optgroup children while filtering has no effect on the $replacement object - the one that's now visible to the user. We'll simplify and fix this by injecting the content of the copy instead of going through the trouble of cloning it. PHPBB3-13069 --- phpBB/assets/javascript/core.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 5fe78cf052..b5187991f9 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -782,12 +782,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) { .insertAfter('#timezone'); } else { // Copy the content of our backup, so we can remove all unneeded options - var $replacement = $timezoneCopy.clone(); - $replacement.attr('id', 'timezone') - .css('display', 'block') - .attr('name', 'tz'); - - $timezone.replaceWith($replacement); + $timezone.html($timezoneCopy.html()); } if ($tzDate.val() !== '') {