Martin Suchan – BloQ Random #WPdev stuff

15Feb/111

Disabling key down event propagation in JavaScript

Imagine this non-trivial problem: you have div element with overflow: auto; and long text inside. The scrollbar appears automatically. Normally when the div is focused pressing keys Up or Down causes moving the content up or down. But what if you don't want to scroll the content on keydown event?