Not losing focus
Closed this issue · 0 comments
cskiwi commented
hi,
When I have this plugin in my app, whenever I press enter the on-select get's called whenever I have the focus on it or not. So maybe fix the enter checking on the document more to the inputfield?
document.addEventListener("keydown", function (e) {
// other code
case key.enter:
if (scope.onSelect) {
scope.onSelect(scope.searchParam);
}
break;
}
}, true);
found out that putting
element[0].add.....
fixes the problem, and still works beautiful :)
I don't have git here availible so no fork request :/