I've implemented a keypress
handler on the body element of a webpage with the intention for it to be active throughout the entire page. However, I've discovered that the keypress
events triggered in text input forms also activate the body handler, which is not what I want.
Is there a way for me to keep the keypress
handler on the body element but exclude it from affecting only the input forms? Can I somehow prevent the event from propagating to the body after being triggered at the input level? (Or am I approaching HTML DOM events incorrectly?)