]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Top-bar-right menus should default to the left
authorKevin Ball <kmball11@gmail.com>
Thu, 7 Apr 2016 23:45:41 +0000 (16:45 -0700)
committerKevin Ball <kmball11@gmail.com>
Thu, 7 Apr 2016 23:45:41 +0000 (16:45 -0700)
js/foundation.dropdownMenu.js

index 2930a2b64bfd472fb753c58aa1a41d661a1fa481..3f2f1c4ae27f0262370922f294889a839705f349 100644 (file)
@@ -50,7 +50,7 @@ class DropdownMenu {
     this.$tabs = this.$element.children('[role="menuitem"]');
     this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);
 
-    if (this.$element.hasClass(this.options.rightClass) || this.options.alignment === 'right' || Foundation.rtl()) {
+    if (this.$element.hasClass(this.options.rightClass) || this.options.alignment === 'right' || Foundation.rtl() || this.$element.parents('.top-bar-right').is('*')) {
       this.options.alignment = 'right';
       subs.addClass('opens-left');
     } else {