Browse Source

Fix dropdown icon spacing, fix issues with selectOnKeydown when using text that includes html (like images)

pull/4381/head
Jack Lukic 8 years ago
parent
commit
33ea63ec91
3 changed files with 13 additions and 5 deletions
  1. 3
      RELEASE-NOTES.md
  2. 4
      src/definitions/elements/button.less
  3. 11
      src/definitions/modules/dropdown.js

3
RELEASE-NOTES.md

@ -4,11 +4,14 @@
**Enhancements**
- **Form Validation** - Bracketed notation can now be omitted for rules, instead passing in bracketed values with the `value` parameter #3313
- **Dropdown** - Using `search selection` with `selectOnKeydown` will now highlight the partial search matching the currently keyboard selected value
**Bugs**
- **Button/Dropdown** - Fixed issue where `ui dropdown button` could have incorrect spacing for dropdown icon
- **Button** - Fixed `vertical buttons` with only 1 button having incorrect border radius **Thanks @Denhai** #4107
- **Form** - Fixed issue where `disabled fields` with radio inputs would not correctly dim the label **Thanks @louwers** #4366
- **Menu** - Fixed issue where `dropdown` in `vertical menu` would not correctly open `upward` when no space below **Thanks @gdaunton** #4150 #4156
- **Dropdown** - Using `search selection with `selectOnKeydown` and text content that includes html, will not apply html content (like images) to the text until dropdown blur, making sure that content can align correctly with the partial search content of the search input (which cannot include HTML)
- **Dropdown** - Fixed issue where dropdown `clear` would not remove active state when `useLabels: true` and multiple dropdown #4275 #4366 **Thanks vinh123456789**
- **Dropdown** - `dropdown icon` no longer relies on stopping event propagation. This means using the dropdown icon will now cause other dropdowns to correctly hide. #3998
- **Dropdown** - Fixes `action: select` not working correctly since `2.2` due to incorrect use of new function signature. #4183

4
src/definitions/elements/button.less

@ -591,10 +591,10 @@
color: @iconColor;
}
.ui.button:not(.icon) > .icon:not(.button) {
.ui.button:not(.icon) > .icon:not(.button):not(.dropdown) {
margin: @iconMargin;
}
.ui.button:not(.icon) > .right.icon:not(.button) {
.ui.button:not(.icon) > .right.icon:not(.button):not(.dropdown) {
margin: @rightIconMargin;
}

11
src/definitions/modules/dropdown.js

@ -958,7 +958,7 @@ $.fn.dropdown = function(parameters) {
pageLostFocus = (document.activeElement === this);
if(!willRefocus) {
if(!itemActivated && !pageLostFocus) {
if(settings.forceSelection && module.has.query()) {
if(settings.forceSelection) {
module.forceSelection();
}
module.hide();
@ -2294,11 +2294,16 @@ $.fn.dropdown = function(parameters) {
}
},
selectedItem: function($item) {
var
value = module.get.choiceValue($item),
text = module.get.choiceText($item, false)
;
module.debug('Setting user selection to item', $item);
module.remove.activeItem();
module.set.partialSearch(module.get.choiceText($item));
module.set.partialSearch(text);
module.set.activeItem($item);
module.set.selected(module.get.choiceValue($item), $item);
module.set.selected(value, $item);
module.set.text(text);
},
selectedLetter: function(letter) {
var

Loading…
Cancel
Save