I'm using Firefox 65.0 for my web development. My project code contains password input. I developed this before more than a year ago using JS code that detects the key presses using onkeydown
and onkeyup
functions. It works fine for all browsers except the new Firefox version 65.0
My code is similar to this:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type=password id="button" autocomplete_="off"></input>
<script>
$("#button").keydown(function(event) {
console.log("key: " + event.key);
});
document.getElementById("button").onkeydown = function(event) {
console.log("key: " + event.key);
};
</script>
For both cases the event.key
value is not the pressed button, but it's just "Process"
as a string. Does someone have an idea why I get this result? How can I solve it and detect the real pressed key value?
My OS version: is ubuntu 18.04
Edit: add debug screen shot
In addition I can't find any attribute under event that can help me
you can find below a screen shot of a debug in the onkeydown handler for the case of 'a' key.