From: se7 Date: Tue, 6 Jan 2015 19:36:25 +0000 (-0800) Subject: Accomodate for case when document is clicked (hard to accomplish UI wise), but fairly... X-Git-Tag: v5.5.1~37^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6175%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Accomodate for case when document is clicked (hard to accomplish UI wise), but fairly common with patterns like $(document).click() to simulate this. --- diff --git a/js/foundation/foundation.dropdown.js b/js/foundation/foundation.dropdown.js index 5f3886c51..18ed56063 100644 --- a/js/foundation/foundation.dropdown.js +++ b/js/foundation/foundation.dropdown.js @@ -91,7 +91,7 @@ self.close.call(self, S('[' + self.attr_name() + '-content]')); } - if (!$.contains(document.documentElement, e.target)) { + if (e.target !== document && !$.contains(document.documentElement, e.target)) { return; }