Browse Source

Fixes comma delimited

pull/2034/head
jlukic 9 years ago
parent
commit
a0d3040412
1 changed files with 5 additions and 7 deletions
  1. 12
      src/definitions/modules/dropdown.js

12
src/definitions/modules/dropdown.js

@ -731,6 +731,10 @@ $.fn.dropdown = function(parameters) {
; ;
if(pressedKey == keys.delimiter) { if(pressedKey == keys.delimiter) {
// tokenize on comma // tokenize on comma
if(module.is.visible()) {
module.event.item.click.call($selectedItem, event);
event.preventDefault();
}
} }
else if(pressedKey == keys.leftArrow) { else if(pressedKey == keys.leftArrow) {
// activate previous label // activate previous label
@ -986,16 +990,10 @@ $.fn.dropdown = function(parameters) {
return range.text.length - rangeLength; return range.text.length - rangeLength;
} }
}, },
keyCode: function(letter) {
return (typeof letter == 'string')
? letter.charCodeAt(0)
: false
;
},
shortcutKeys: function() { shortcutKeys: function() {
return { return {
backspace : 8, backspace : 8,
delimiter : module.get.keyCode(settings.delimiter),
delimiter : 188, // comma
deleteKey : 46, deleteKey : 46,
enter : 13, enter : 13,
escape : 27, escape : 27,

Loading…
Cancel
Save