Fix autocomplétion article K-Psul

This commit is contained in:
Aurélien Delobelle 2016-09-05 20:35:45 +02:00
parent 5e6645ab84
commit 985dd2e82d

View file

@ -635,7 +635,9 @@ $(document).ready(function() {
return false;
}
articleSelect.on('keypress', function(e) {
articleSelect.on('keydown', function(e) {
console.log('trolo');
console.log(e.charCode);
var text = articleSelect.val();
// Comportement normal pour ces touches
if (normalKeys.test(e.keyCode) || e.ctrlKey) {
@ -648,14 +650,12 @@ $(document).ready(function() {
articleSelect.val('');
}
return true;
} else if (e.charCode !== 0) {
}
if (updateMatchedArticles(text+e.key)) {
articleNb.val('1');
articleNb.focus().select();
}
return false;
}
return false;
});
function is_nb_ok(nb) {