From 2c3511b99c420ae16ff844b9f2b1094a01568b96 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 10 Jul 2017 22:30:53 -0700 Subject: [PATCH] Last minute regression fixes from leftward changes #4506 --- RELEASE-NOTES.md | 2 +- src/definitions/modules/dropdown.js | 8 ++--- src/definitions/modules/dropdown.less | 48 +++++++++++++-------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index eb2d15243..f4980db9d 100755 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -3,7 +3,7 @@ ### Version 2.2.11 - July 11, 2017 **Critical Bugs** (5) -- **Dropdown** - Fixed issue where using `down` key to re-open dropdown when using `search selection dropdown` would start at the top element instead of jumping to selected element +- **Dropdown** - Fixed issue where using `down` key to re-open dropdown when using `search selection dropdown` would start at the top element instead of jumping to selected element [#4506](https://github.com/Semantic-Org/Semantic-UI/issues/4506) - **Modal** - Using multiple modals with different `inverted` `blurring` or `closable` settings will now function normally in all cases [#4368](https://github.com/Semantic-Org/Semantic-UI/issues/4368) - **Modal** - Fixed issue where modal `refresh` was being called on modals even if they are hidden, causing display issues when multiple modals are shown. **Thanks @p2kmgcl** [#5319](https://github.com/Semantic-Org/Semantic-UI/issues/5319) - **Form Validation** - Fixed issue where radio was not being included in `onFailure` values if not set [#5064](https://github.com/Semantic-Org/Semantic-UI/issues/5064) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 61d8f489e..4c6dde018 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -3312,11 +3312,11 @@ $.fn.dropdown = function(parameters) { onStart : start, onComplete : function() { if(settings.direction == 'auto') { - if ($currentMenu.hasClass(className.leftward)) { - module.remove.leftward($subMenu); + if($currentMenu.hasClass(className.leftward)) { + module.remove.leftward($currentMenu); } - else { - module.remove.upward($subMenu); + if($currentMenu.hasClass(className.upward)) { + module.remove.upward($currentMenu); } } callback.call(element); diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less index d46eb5130..daac30365 100755 --- a/src/definitions/modules/dropdown.less +++ b/src/definitions/modules/dropdown.less @@ -1273,8 +1273,8 @@ select.ui.dropdown { .ui.top.pointing.dropdown > .left.menu:after, .ui.top.right.pointing.dropdown > .menu:after { top: @pointingArrowOffset; - left: auto; - right: @pointingArrowDistanceFromEdge; + left: auto !important; + right: @pointingArrowDistanceFromEdge !important; margin: 0em; transform: rotate(45deg); } @@ -1292,12 +1292,12 @@ select.ui.dropdown { margin: 0em 0em 0em 0em; transform: rotate(-45deg); } -.ui.left.pointing.dropdown > .left.menu { +.ui.left:not(.top):not(.bottom).pointing.dropdown > .left.menu { left: auto !important; right: 100% !important; margin: 0em @pointingArrowDistanceFromEdge 0em 0em; } -.ui.left.pointing.dropdown > .left.menu:after { +.ui.left:not(.top):not(.bottom).pointing.dropdown > .left.menu:after { top: 1em; left: auto; right: @pointingArrowOffset; @@ -1363,44 +1363,44 @@ select.ui.dropdown { } /* Upward pointing */ -.ui.upward.pointing.dropdown > .menu, -.ui.upward.top.pointing.dropdown > .menu { - top: auto; - bottom: 100%; +.ui.pointing.dropdown > .upward.menu, +.ui.top.pointing.dropdown > .upward.menu { + top: auto !important; + bottom: 100% !important; margin: 0em 0em @pointingMenuDistance; border-radius: @pointingUpwardMenuBorderRadius; } -.ui.upward.pointing.dropdown > .menu:after, -.ui.upward.top.pointing.dropdown > .menu:after { - top: 100%; - bottom: auto; +.ui.pointing.dropdown > .upward.menu:after, +.ui.top.pointing.dropdown > .upward.menu:after { + top: 100% !important; + bottom: auto !important; box-shadow: @pointingUpwardArrowBoxShadow; margin: @pointingArrowOffset 0em 0em; } /* Right Pointing Upward */ -.ui.upward.right.pointing.dropdown:not(.top):not(.bottom) > .menu { - top: auto; - bottom: 0; +.ui.right.pointing.dropdown:not(.top):not(.bottom) > .upward.menu { + top: auto !important; + bottom: 0 !important; margin: 0em @pointingArrowDistanceFromEdge 0em 0em; } -.ui.upward.right.pointing.dropdown:not(.top):not(.bottom) > .menu:after { - top: auto; - bottom: 0; +.ui.right.pointing.dropdown:not(.top):not(.bottom) > .upward.menu:after { + top: auto !important; + bottom: 0 !important; margin: 0em 0em @pointingArrowDistanceFromEdge 0em; box-shadow: @pointingArrowBoxShadow; } /* Left Pointing Upward */ -.ui.upward.left.pointing.dropdown:not(.top):not(.bottom) > .menu { - top: auto; - bottom: 0; +.ui.left.pointing.dropdown:not(.top):not(.bottom) > .upward.menu { + top: auto !important; + bottom: 0 !important; margin: 0em 0em 0em @pointingArrowDistanceFromEdge; } -.ui.upward.left.pointing.dropdown:not(.top):not(.bottom) > .menu:after { - top: auto; - bottom: 0; +.ui.left.pointing.dropdown:not(.top):not(.bottom) > .upward.menu:after { + top: auto !important; + bottom: 0 !important; margin: 0em 0em @pointingArrowDistanceFromEdge 0em; box-shadow: @pointingArrowBoxShadow; }