]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Use correct parent width
authorTJ Higgins <thiggins@insightsquared.com>
Thu, 10 Mar 2016 22:39:37 +0000 (22:39 +0000)
committerTJ Higgins <thiggins@insightsquared.com>
Thu, 10 Mar 2016 22:39:37 +0000 (22:39 +0000)
js/foundation.dropdown.js

index 5e90b3447efbc4b34f1c1fcaa98bbdd9751461ff..851c64614761d1db27dfd27f97f6b15818751046 100644 (file)
@@ -141,8 +141,8 @@ class Dropdown {
       if(this.$parent) {
         var $parentDims = Foundation.Box.GetDimensions(this.$parent);
         newHOffset = $parentDims.offset.left;
-        if($parentDims.windowDims.width < newWidth){
-          newWidth = $parentDims.windowDims.width;
+        if($parentDims.width < newWidth){
+          newWidth = $parentDims.width;
         }
       }
       this.$element.offset(Foundation.Box.GetOffsets(this.$element, this.$anchor, 'center bottom', this.options.vOffset, this.options.hOffset + newHOffset, true)).css({