News for hackers. Stuff that matters.
Re:Just Use a Button by susam on Friday October 31, 2025 @02:29PM (#45775151)
> 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://github.com/susam/quickqwerty/blob/1.2.0/quickqwerty....

Nice article, by the way!

Re:Just Use a Button by skrebbel on Friday October 31, 2025 @02:37PM (#45775223)
I 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