searchpicker
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -363,2 +363,3 @@ "use strict"; | ||
var choice = document.createElement('li'); | ||
choice.tabIndex = 0; //important to receive keyboard events | ||
choice.className = 'search-choice'; | ||
@@ -397,3 +398,5 @@ choice.setAttribute('data-id', item.id.toString()); | ||
e.stopPropagation(); | ||
_this.inputElm.focus(); | ||
if (_this.inputElm.style.display !== "none") { | ||
_this.inputElm.focus(); | ||
} | ||
}; | ||
@@ -406,2 +409,8 @@ choice.onkeyup = function (e) { | ||
}; | ||
choice.onblur = function (e) { | ||
_this.onBlur(); | ||
}; | ||
choice.onfocus = function (e) { | ||
_this.onFocus(); | ||
}; | ||
choice.appendChild(this.options.choiceRenderer(item, this.options.maxSelectedChoices == 1)); | ||
@@ -408,0 +417,0 @@ return choice; |
{ | ||
"name": "searchpicker", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/Index.js", |
@@ -353,3 +353,5 @@ import {EventObject} from "./EventObject"; | ||
setTimeout(() => { | ||
if (!this.keepActive) { | ||
Utility.removeClass(this.container, 'active'); // active in ul root elem | ||
@@ -400,2 +402,3 @@ this.isActive = false; | ||
let choice = document.createElement('li'); | ||
choice.tabIndex = 0; //important to receive keyboard events | ||
choice.className = 'search-choice'; | ||
@@ -439,4 +442,6 @@ choice.setAttribute('data-id', item.id.toString()); | ||
e.stopPropagation(); | ||
if(this.inputElm.style.display !== "none"){ | ||
this.inputElm.focus(); | ||
} | ||
this.inputElm.focus(); | ||
}; | ||
@@ -452,2 +457,10 @@ | ||
choice.onblur = (e) => { | ||
this.onBlur(); | ||
}; | ||
choice.onfocus = (e) => { | ||
this.onFocus(); | ||
}; | ||
choice.appendChild(this.options.choiceRenderer(item, this.options.maxSelectedChoices == 1)); | ||
@@ -454,0 +467,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
215511
2976