3 ms·
> Not events generally, keydown events specifically, which do not fire on child elements of the document. Are you sure? I have a 17 year old HTML tool written
by susam 1y ago
> Not events generally, keydown events specifically, which do not fire on child elements of the document.
Are you sure? I have a 17 year old HTML tool written using plain, vanilla JavaScript where keydown on a child element seems to have been working as expected.
https://susam.net/quickqwerty.html https://susam.net/quickqwerty.html
https://github.com/susam/quickqwerty/blob/1.2.0/quickqwerty.html#L299 https://github.com/susam/quickqwerty/blob/1.2.0/quickqwerty....
Nice article, by the way!
- skrebbel 1y agoI think that’s because it’s an input and not a div, so it can get focus. Im not sure whether tabindex is enough to make a div do that too, article suggests no