From 53457f5e75f781c92882d182b69bfd6c0a9591b8 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 16 Dec 2015 15:19:31 -0300 Subject: [PATCH] Set overflow visible to dropdowns in test results filter to ensure they are displayed. Fixes #617. --- app/assets/javascripts/application.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 1f6a2bbf5..7562dae7a 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -129,8 +129,19 @@ $(document).ready(function(){ } }); + var advancedTimeout = null; $(".btn-toggle").click(function(){ - $(".advanced").toggleClass('show'); + + // We want to set overflow visible after the expand animation has completed + var advanced = $(".advanced"); + if (advanced.hasClass('show')) { + if (advancedTimeout) window.clearTimeout(advancedTimeout); + advanced.css('overflow', 'hidden'); + } else { + advancedTimeout = window.setTimeout(function() { advanced.css('overflow', 'visible'); }, 500); + } + + advanced.toggleClass('show'); $(this).toggleClass('up'); return false; });