]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix modals not closing the first time they're clicked
authorGeoff Kimball <geoff@zurb.com>
Wed, 17 Feb 2016 22:59:50 +0000 (14:59 -0800)
committerGeoff Kimball <geoff@zurb.com>
Wed, 17 Feb 2016 22:59:50 +0000 (14:59 -0800)
js/foundation.reveal.js

index a2d22527b906f0b2f13eb3c6764fab5a00f0f695..924c7763da5cd3fd606467b468e3d6f15739815a 100644 (file)
@@ -369,6 +369,8 @@ class Reveal {
         finishUp();
       }
 
+      debugger;
+
       this.$element.hide(this.options.hideDelay);
     }
 
@@ -396,13 +398,13 @@ class Reveal {
         'tabindex': ''
       });
 
-      this.$element.attr('aria-hidden', true);
+      _this.$element.attr('aria-hidden', true);
 
       /**
       * Fires when the modal is done closing.
       * @event Reveal#closed
       */
-      this.$element.trigger('closed.zf.reveal');
+      _this.$element.trigger('closed.zf.reveal');
     }
 
     /**