From 179dea085f5f09296fec40f5bef55319e75c41e7 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 25 Nov 2019 11:28:11 +0100 Subject: [PATCH] Fix dropdown event after click browser back action --- app/assets/javascripts/sitewide/dropdown_selector.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/sitewide/dropdown_selector.js b/app/assets/javascripts/sitewide/dropdown_selector.js index fcaea5c1d..0e988f85a 100644 --- a/app/assets/javascripts/sitewide/dropdown_selector.js +++ b/app/assets/javascripts/sitewide/dropdown_selector.js @@ -221,7 +221,9 @@ var dropdownSelector = (function() { var dropdownContainer; // Check if element exist or already initialized - if (selectElement.length === 0 || selectElement.next().hasClass('dropdown-selector-container')) return; + if (selectElement.length === 0 || selectElement.next().hasClass('dropdown-selector-container')) { + selectElement.next().remove(); + } // Create initial container after select block dropdownContainer = selectElement.after('').next();