I had a specific case with a TAB key that changes e.target to keyUp, so the solution is that it binds to the container element, captures the target input in the keyDown handler, subscribes to keyUp and reads the value.
$("#container").keydown(function (e) {
var myInput = e.target;
$("#container").one('keyup', function() {
console.log(myInput.val());
});
});
Kosau source
share