From 1a5010b36e1373d658b6adcb5a127d24fc8d950b Mon Sep 17 00:00:00 2001 From: jlukic Date: Tue, 26 May 2015 16:53:02 -0400 Subject: [PATCH] Fix loading dropdown button, duplicate loading state, similar #2295. Fix search inside menu does not clear search term on select --- src/definitions/modules/dropdown.js | 5 +++-- src/definitions/modules/dropdown.less | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 2d6102cf0..c84408c97 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -1722,6 +1722,8 @@ $.fn.dropdown = function(parameters) { scrollPage: function(direction, $selectedItem) { var + $selectedItem = $selectedItem || module.get.selectedItem(), + $menu = $selectedItem.closest(selector.menu), menuHeight = $menu.outerHeight(), currentScroll = $menu.scrollTop(), itemHeight = $item.eq(0).outerHeight(), @@ -1735,7 +1737,6 @@ $.fn.dropdown = function(parameters) { $nextSelectedItem, elementIndex ; - $selectedItem = $selectedItem || module.get.selectedItem(); elementIndex = (direction == 'up') ? $selectableItem.index($selectedItem) - itemsPerPage : $selectableItem.index($selectedItem) + itemsPerPage @@ -2618,7 +2619,7 @@ $.fn.dropdown = function(parameters) { }, hideAndClear: function() { - if(module.is.searchSelection()) { + if(module.has.search()) { module.remove.searchTerm(); module.hide(function() { module.remove.filteredItem(); diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less index 1c73a09ca..d36eaccac 100755 --- a/src/definitions/modules/dropdown.less +++ b/src/definitions/modules/dropdown.less @@ -781,6 +781,12 @@ select.ui.dropdown { border-width: @loaderLineWidth; } +/* Coupling */ +.ui.loading.dropdown.button > i.icon:before, +.ui.loading.dropdown.button > i.icon:after { + display: none; +} + @keyframes dropdown-spin { from { transform: rotate(0deg);