From 7c01d212b889dcbf7a7de8685cad16b3288593c8 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Thu, 12 May 2016 11:58:26 -0400 Subject: [PATCH] Rename selectonShortcut --- RELEASE-NOTES.md | 2 +- src/definitions/modules/dropdown.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 1eaa3c6d7..806ab7aa2 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -8,7 +8,7 @@ - **Form Validation** - Added ability for field validation to depend on other fields being filled out - **Popup** - Added new setting `boundary` and `scrollContext`. `boundary` lets you specify an element that the popup will try to position itself to be contained inside of. `scrollContext` lets you specify the element which when scrolled should hide the popup - **Popup** - Added new settings `autoRemove`, which is enabled by default. This will add special event listeners to auto hide a popup if the triggering element is removed from the DOM. This is useful in controlled DOM environments like Meteor/Ember/React to ensure a popup auto-hides itself when a page navigation or other DOM change occurs that may not trigger `mouseout`. -- **Dropdown** - Dropdown now changes user selection on keyboard shortcuts **immediately**, this will save the extra `enter` key press to confirm selection in most cases. To enable previous pre `2.2` selection style use the setting `selectOnShortcut: false` +- **Dropdown** - Dropdown now changes user selection on keyboard shortcuts **immediately**, this will save the extra `enter` key press to confirm selection in most cases. To enable previous pre `2.2` selection style use the setting `selectOnKeydown: false` - **Dropdown** - Multiple select dropdown now sizes current dropdown input based on rendered width of a hidden element, not using an estimate based on character count. This means search will never break to a second line earlier than would normally fit in current line. - **Dropdown** - Added new setting for search selection `hideAdditions` this will remove showing user additions inside the menu, making for a more intuitive adding process. Dropdowns now have a new state `empty` which will format an active dropdown with empty results. #3791 - **Dropdown** - Adds new `allowReselection` option to trigger `onChange` events even when reselecting same value ***NEEEDS DOCUMENTATION*** diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index ee611a41b..802dff594 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -1332,7 +1332,7 @@ $.fn.dropdown = function(parameters) { .addClass(className.selected) ; module.set.scrollPosition($nextItem); - if(settings.selectOnShortcut && module.is.single()) { + if(settings.selectOnKeydown && module.is.single()) { module.set.selectedItem($nextItem); } } @@ -1359,7 +1359,7 @@ $.fn.dropdown = function(parameters) { .addClass(className.selected) ; module.set.scrollPosition($nextItem); - if(settings.selectOnShortcut && module.is.single()) { + if(settings.selectOnKeydown && module.is.single()) { module.set.activeItem($nextItem); module.set.selected(module.get.choiceValue($nextItem), $nextItem); } @@ -2071,7 +2071,7 @@ $.fn.dropdown = function(parameters) { $nextSelectedItem .addClass(className.selected) ; - if(settings.selectOnShortcut && module.is.single()) { + if(settings.selectOnKeydown && module.is.single()) { module.set.selectedItem($nextSelectedItem); } $menu @@ -2260,7 +2260,7 @@ $.fn.dropdown = function(parameters) { module.set.scrollPosition($nextValue); $selectedItem.removeClass(className.selected); $nextValue.addClass(className.selected); - if(settings.selectOnShortcut && module.is.single()) { + if(settings.selectOnKeydown && module.is.single()) { module.set.selectedItem($nextValue); } } @@ -3417,7 +3417,7 @@ $.fn.dropdown.settings = { apiSettings : false, - selectOnShortcut : true, // Whether selection should occur automatically when keyboard shortcuts used + selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used minCharacters : 0, // Minimum characters required to trigger API call saveRemoteData : true, // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh throttle : 200, // How long to wait after last user input to search remotely