Is it expected that handleDOMEvents.keypress
would not fire?
Is your browser firing keypress events (those have been deprecated for a long time)? Did you handle/preventDefault the keydown event (that will prevent keypress from firing)?
Thanks for your reply @marijn!
I know they’re deprecated but some things are just really difficult to emulate with keyup
and keydown
.
I’m running Chrome 122 and indeed they do fire at the browser level.
It didn’t occur to me that preventDefault
on keydown
would prevent keypress
.
I don’t know if it’s a valid test, but when I add an event listener with document.addEventListener('keypress, ...)
and log out the event, defaultPrevented
is false
. I’m not sure if that runs before the editor’s keydown
handlers?
But so ProseMirror should fire the events? If so, I’ll report back if I ever find the cause of the problem.