From: Daniel Ruf Date: Wed, 21 Feb 2018 12:16:34 +0000 (+0100) Subject: Revert "trigger opened.zf.offcanvas at the end" X-Git-Tag: v6.6.0~3^2~295^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5ef695c7;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Revert "trigger opened.zf.offcanvas at the end" This reverts commit 5c91b76b5542ad656b7cc8c7cc17664da837a09a. --- diff --git a/js/foundation.offcanvas.js b/js/foundation.offcanvas.js index a5fb0cf6d..5d14ab9f5 100644 --- a/js/foundation.offcanvas.js +++ b/js/foundation.offcanvas.js @@ -328,6 +328,12 @@ class OffCanvas extends Plugin { this.$overlay.addClass('is-closable'); } + /** + * Fires when the off-canvas menu opens. + * @event OffCanvas#opened + */ + this.$element.trigger('opened.zf.offcanvas'); + if (this.options.autoFocus === true) { this.$element.one(transitionend(this.$element), function() { if (!_this.$element.hasClass('is-open')) { @@ -348,12 +354,6 @@ class OffCanvas extends Plugin { } this._addContentClasses(); - - /** - * Fires when the off-canvas menu opens. - * @event OffCanvas#opened - */ - this.$element.trigger('opened.zf.offcanvas'); } /**