From: Daniel Ruf Date: Mon, 14 Oct 2019 21:39:44 +0000 (+0200) Subject: fix: clear the animation queue - closes #10486 X-Git-Tag: v6.6.2^2~20^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11859%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: clear the animation queue - closes #10486 --- diff --git a/js/foundation.accordion.js b/js/foundation.accordion.js index e2f9116f0..6d88069b4 100644 --- a/js/foundation.accordion.js +++ b/js/foundation.accordion.js @@ -44,7 +44,7 @@ class Accordion extends Plugin { this.$element.attr('role', 'tablist'); this.$tabs = this.$element.children('[data-accordion-item]'); - + this.$tabs.attr({'role': 'presentation'}); this.$tabs.each(function(idx, el) { @@ -274,7 +274,7 @@ class Accordion extends Plugin { 'aria-selected': true }); - $target.slideDown(this.options.slideSpeed, () => { + $target.stop().slideDown(this.options.slideSpeed, () => { /** * Fires when the tab is done opening. * @event Accordion#down @@ -302,7 +302,7 @@ class Accordion extends Plugin { 'aria-selected': false }); - $target.slideUp(this.options.slideSpeed, () => { + $target.stop().slideUp(this.options.slideSpeed, () => { /** * Fires when the tab is done collapsing up. * @event Accordion#up