HTML and JS on Windows only - input field does not generate onkeup/down events for non-english chars

37 Views Asked by At

I have a very simple code with a text input box and a simple onkeyup handler. For some reason if my keyboard is in non-English language ( Russian, for example ) - they chars will be shown in the input field but no events will be generated. Pressing speace,enter or even arrows will generate the event and then the whole text is visible to the code.

This behavior is only like that on Windows ( IE, chrome, Edge ). On MAC it works as expected ( Chrome, Safari )

function line_Change(obj)
{
   alert("here");
}
  <input type="text" id="input1" onkeyup = "line_Change(this)" placeholder="Try typing something in here!">
  <label for="input1">Line 1</label>

EDIT: I found out that it does not work when connected to Windows from macOS thru TeamViewer. When working directly on Windows - the results are as expected

0

There are 0 best solutions below