Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`input.onkeypress` is never called #9573
Comments
|
Cc @paulrouget |
|
|
|
I'm not sure why we need to prevent the default there? Or is that to stop it from bubbling further? b0552cb added this. |
|
It's to properly handle things like
from executing the JS handler when the user modifies the input. |
|
Which apparently is a totally misguided goal, given how Firefox treats that (ie. the JS handler is executed). |
|
So, we should just remove it? (E-easy, perhaps) I can understand setting Bubbles to false or doing something like that. DefaultPrevented isn't something our code should be messing with, and if we need a similar mechanism we should implement an internal one. But it doesn't look like one is necessary in this case. Aside: There's a good chance above behavior with the JS handler is not consistent across browsers; I recall previous inconsistencies arising from nested form widgets and stuff (I can't recall exactly what), and this is pretty similar. The spec isn't very clear when it comes to these things, which is fine -- stop nesting inputable things, that's silly! -- and as far as |
|
Nice, Firefox executes the onkeydown in the body element, and blink doesn't. I wonder what edge does? |
I run into this issue in browserhtml/browserhtml#863 it turns out servo never dispatches
keypressevents. Here is also a simple test case I've created:If you type into input field and type
syou should see:in servo you'll see following instead: