From 218083b5a35861cbaf28e4c993d11ed158f2df48 Mon Sep 17 00:00:00 2001 From: jlukic Date: Tue, 13 Jan 2015 14:45:05 -0500 Subject: [PATCH] Complete integration of autocomplete on ui search dropdown #1508 --- src/definitions/modules/dropdown.js | 5 +++-- src/definitions/modules/dropdown.less | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index 53c17d12e..a181c8cc3 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -299,7 +299,7 @@ $.fn.dropdown = function(parameters) { .on('click' + eventNamespace, selector.search, module.show) .on('focus' + eventNamespace, selector.search, module.event.searchFocus) .on('blur' + eventNamespace, selector.search, module.event.searchBlur) - .on('focus' + eventNamespace, selector.text, module.event.searchTextFocus) + .on('click' + eventNamespace, selector.text, module.event.searchTextFocus) ; } else { @@ -452,7 +452,8 @@ $.fn.dropdown = function(parameters) { } }, searchTextFocus: function(event) { - $input.focus(); + activated = true; + $search.focus(); }, input: function(event) { if(module.is.searchSelection()) { diff --git a/src/definitions/modules/dropdown.less b/src/definitions/modules/dropdown.less index b7861a7a1..ccdbd13cc 100755 --- a/src/definitions/modules/dropdown.less +++ b/src/definitions/modules/dropdown.less @@ -513,24 +513,26 @@ select.ui.dropdown { z-index: 2; } .ui.search.dropdown > .text { + cursor: text; position: relative; z-index: 3; } -.ui.search.dropdown > input:-webkit-autofill { - background: none transparent !important; -} - /* Search Selection */ .ui.search.selection.dropdown > input.search { line-height: @searchSelectionLineHeight; padding: @searchSelectionInputPadding; } +/* Active/Visible Search */ .ui.search.dropdown.active > input.search, .ui.search.dropdown.visible > input.search { cursor: auto; } +.ui.search.dropdown.active > .text, +.ui.search.dropdown.visible > .text { + pointer-events: none; +} .ui.active.search.dropdown > input.search:focus + .text { color: @unselectedTextColor !important; }