]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
var $body = $('body').not(_this.$wrapper); 8599/head
authorjk <j.koehler@modulingo.de>
Wed, 13 Apr 2016 22:45:28 +0000 (00:45 +0200)
committerjk <j.koehler@modulingo.de>
Wed, 13 Apr 2016 22:45:28 +0000 (00:45 +0200)
not ignores clicks on links in the drilldown menu
fixes links with no sub and closeOnClick true doesn't fire

js/foundation.drilldown.js

index b9f67b3e602e0ba606f6b270f7ff4eb6e80a2b39..f8771cadf77965360f13c8177cdf206dec941330 100644 (file)
@@ -116,8 +116,9 @@ class Drilldown {
       _this._show($elem.parent('li'));
 
       if(_this.options.closeOnClick){
-        var $body = $('body').not(_this.$wrapper);
+        var $body = $('body');
         $body.off('.zf.drilldown').on('click.zf.drilldown', function(e){
+          if (e.target === _this.$element[0] || $.contains(_this.$element[0], e.target)) { return; }
           e.preventDefault();
           _this._hideAll();
           $body.off('.zf.drilldown');