]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
revert component file and test to initial state
authorDaniel Ruf <daniel.ruf@ueberbit.de>
Wed, 21 Feb 2018 12:26:23 +0000 (13:26 +0100)
committerDaniel Ruf <daniel.ruf@ueberbit.de>
Wed, 21 Feb 2018 12:26:35 +0000 (13:26 +0100)
js/foundation.offcanvas.js
test/javascript/components/offcanvas.js

index 5d14ab9f51a58d06b9b8076445bed890eb5c1147..c64cb86b61c8cfebb8f6ff5876cee4d86106b8ba 100644 (file)
@@ -327,13 +327,7 @@ class OffCanvas extends Plugin {
     if (this.options.closeOnClick === true && this.options.contentOverlay === true) {
       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')) {
index 7938dbaf1726f0109d0bf6b87b8240db57d4e75d..d5cace80067e7a4e95c431d2f4dac6b0049072a3 100644 (file)
@@ -104,7 +104,7 @@ describe('Off Canvas', function() {
           plugin.$element.should.have.class('is-open');
           $('body').should.have.class('is-off-canvas-open');
           done();
-        }, 30);
+        }, 1);
       });
 
       plugin.open();
@@ -252,7 +252,7 @@ describe('Off Canvas', function() {
       plugin.toggle();
     });
   });
-  
+
   describe('keyboard events', function() {
     it('closes Off Canvas on ESCAPE', function(done) {
       $html = $(template).appendTo('body');