From: Daniel Ruf Date: Thu, 15 Feb 2018 09:02:42 +0000 (+0100) Subject: trigger opened.zf.offcanvas at the end X-Git-Tag: v6.6.0~3^2~295^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c91b76b5542ad656b7cc8c7cc17664da837a09a;p=thirdparty%2Ffoundation%2Ffoundation-sites.git trigger opened.zf.offcanvas at the end --- diff --git a/js/foundation.offcanvas.js b/js/foundation.offcanvas.js index b335cb0cb..6c46ce0aa 100644 --- a/js/foundation.offcanvas.js +++ b/js/foundation.offcanvas.js @@ -324,12 +324,6 @@ 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')) { @@ -350,6 +344,12 @@ class OffCanvas extends Plugin { } this._addContentClasses(); + + /** + * Fires when the off-canvas menu opens. + * @event OffCanvas#opened + */ + this.$element.trigger('opened.zf.offcanvas'); } /**