As the title explains. I cannot receive keypress events on any element, including document, using addeventlistener.
Anyone know anything about this?
As the title explains. I cannot receive keypress events on any element, including document, using addeventlistener.
Anyone know anything about this?
I have written code in Preact that uses onKeyDown, onInput, etc. for sp-textfield
and it seems to work fine. What is your environment?
Hey, thanks for taking the time
I am running windows 11 on a new work laptop.
I am using UXP, and the change came after updating to indesign 2025.
I am not using spectrum, but vanilla html/css. The code is structured around bolt-uxp and react, but even outside the frameworks i cannot use the onkeydown
My brain just thought, “what if i try in a different browser?”… I guess its still morning
Tried input tag just to be sure. onKeyPress does not respond, but onKeyDown and onKeyUp work. onKeyPress is deprecated, so this should not be a problem.
Is this difference due to OS, Preact or React, or some framework? I would like to know another person’s opinion.
<input
type='text'
value='a'
onKeyDown={ (event) => {
event.preventDefault() ;
console.log(event) ;
} }
/>