[Question] Attaching keyboard events for a mosaic window
fmg-lydonchandra opened this issue · comments
Hi, is there a nice way to capture keyboard events for a mosaic tile ?
One way is in renderTile, <div tabIndex={0} onKeyXxx={onKeyXxxHandler}>
can wrap <MosaicWindow>
and we can propagate the keyboard events manually.
Must have tabIndex attribute to make <div>
focusable
<div
role="presentation"
tabIndex={0}
onKeyDown={onKeyDownHandler}
onKeyUp={onKeyUpHandler}>
<MosaicWindow<string>... />
</div>
Your methodology seems fine - are there problems in practice?
It's working OK in practice, checking if there is a better way. Thanks for your quick response Kevin.