Closed iamrakhmatov closed 1 day ago
So basically you want to have
<input onKeyDown={(e) => { e.target.blur(); }} />
Do I understand that correctly? I guess it has to do with this library calling preventDefault
, but not too sure yet. Would need to investigate
You should be able to do so now in https://github.com/dan-lee/timescape/releases/tag/timescape@0.6.2, but you need to use onKeyDownCapture
for it to work:
<input
onKeyDownCapture={(e) => {
if (e.key === 'Enter') {
e.preventDefault()
}
}}
/>
When pressing Enter key onKeyDown event is not triggering, I need this event because I want to change behavior for Enter key, right now when it's clicked focus just moves to the next segment, but I want to propagate the event to parent component and blur the component