Browse Source

#3016, dont use delimiter key when not multiple with additions allowed

pull/3042/head
Jack Lukic 9 years ago
parent
commit
f86b8015b1
1 changed files with 2 additions and 2 deletions
  1. 4
      src/definitions/modules/dropdown.js

4
src/definitions/modules/dropdown.js

@ -1161,7 +1161,7 @@ $.fn.dropdown = function(parameters) {
if( module.is.visible() ) {
// enter (select or open sub-menu)
if(pressedKey == keys.enter || pressedKey == keys.delimiter) {
if(pressedKey == keys.enter) {
if(pressedKey == keys.enter && hasSelectedItem && hasSubMenu && !settings.allowCategorySelection) {
module.verbose('Pressed enter on unselectable category, opening sub menu');
pressedKey = keys.rightArrow;
@ -1278,7 +1278,7 @@ $.fn.dropdown = function(parameters) {
}
else {
// delimiter key
if(pressedKey == keys.delimiter) {
if(pressedKey == keys.delimiter && settings.allowAdditions && module.is.multiple()) {
event.preventDefault();
}
// down arrow (open menu)

Loading…
Cancel
Save