Browse Source

Add cursor spacing, fix #3790 issue with search losing focus on selection

pull/3792/head
Jack Lukic 9 years ago
parent
commit
9c69cb3685
4 changed files with 12 additions and 4 deletions
  1. 3
      RELEASE-NOTES.md
  2. 9
      src/definitions/modules/dropdown.js
  3. 1
      src/definitions/modules/dropdown.less
  4. 3
      src/themes/default/modules/dropdown.variables

3
RELEASE-NOTES.md

@ -28,7 +28,7 @@
- **Dropdown** - Dropdown would open when an label delete x was clicked when not using `search selection` #3789
- **Dropdown** - Dropdowns with sub-menus would not properly activate on mobile #3183
- **Dropdown** - Long dropdown text entry with `allowAdditions` would cause input to mistakingly drop to next line early #3743
- **Dropdown** - Multi select would lose search input focus when clicking on a choice
- **Dropdown** - Seach selection would lose search input focus when clicking on a choice #3790
- **Form** - Grouped `fields` and `field` would cause different margin collapse, making `fields` include larger gaps between content #3717
- **Form** - Remove deprecated `size()` method in `prompt` #3655 **Thanks @SimonArdrey**
- **Grid** - `centered` content would cause `justified` content to appear aligned left. #3496
@ -47,6 +47,7 @@
- **Table** - `striped selectable` table would not correctly show hover color on striped rows
**Enhancements**
- **Dropdown** - Added `1px` offset for current text so that the text position cursor does not overlap first pixel of text.
- **Dropdown** - Added new convenience method `restore placeholder text`
- **Rating** - Added new setting `fireOnInit` for rating, which defaults to `false`. When set to true `onRate` will fire when rating is initialized #3712
- **Site** `@px` and `@relativepx` i.e. `@relative12px` which can be used to return EM value of pixels are now extended to `@relative40px`

9
src/definitions/modules/dropdown.js

@ -827,8 +827,13 @@ $.fn.dropdown = function(parameters) {
$target = $(event.target)
;
// focus search
if($target.is($module) && !module.is.focusedOnSearch()) {
module.focusSearch();
if($target.is($module)) {
if(!module.is.focusedOnSearch()) {
module.focusSearch();
}
else {
module.show();
}
}
},
blur: function(event) {

1
src/definitions/modules/dropdown.less

@ -548,6 +548,7 @@ select.ui.dropdown {
.ui.search.dropdown > .text {
cursor: text;
position: relative;
left: @textCursorSpacing;
z-index: 3;
}

3
src/themes/default/modules/dropdown.variables

@ -44,6 +44,7 @@
/* Text */
@textLineHeight: 1em;
@textLineHeightOffset: (@textLineHeight - 1em);
@textCursorSpacing: 1px;
/* Menu Item */
@itemFontSize: @medium;
@ -367,4 +368,4 @@
/* Pointing Upward */
@pointingUpwardMenuBorderRadius: @borderRadius;
@pointingUpwardArrowBoxShadow: @menuBorderWidth @menuBorderWidth 0px @menuBorderWidth @menuBorderColor;
@pointingUpwardArrowBoxShadow: @menuBorderWidth @menuBorderWidth 0px @menuBorderWidth @menuBorderColor;
Loading…
Cancel
Save