From 601853ca1f213695ea0f64d15dab57420547966c Mon Sep 17 00:00:00 2001 From: sillicon Date: Thu, 28 Jun 2018 16:44:08 -0700 Subject: [PATCH] Fix dropdown issue --- src/definitions/modules/dropdown.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 13652cc100..2bf378e429 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -2415,9 +2415,13 @@ $.fn.dropdown = function(parameters) { }, direction: function($menu) { if(settings.direction == 'auto') { - // reset position - module.remove.upward(); - + // reset position, remove upward if it's base menu + if (!$menu) { + module.remove.upward(); + } else if ($menu.hasClass('upward')) { + //we need make sure when make assertion openDownward for $menu, $menu does not have upward class + $menu.removeClass('upward'); + } if(module.can.openDownward($menu)) { module.remove.upward($menu); }