When applying overflow: hidden;
to a div, I have encountered situations where keyboard actions can still cause the div to scroll, even without visible scrollbars. This makes it difficult to return the div to its original state. Are there any additional steps I should take to prevent this issue?
For instance, in the provided fiddle, if you click on the letter L
and then press the down arrow key while holding shift (expanding the selection), the undesired scrolling behavior occurs.
Check out the example here: http://jsfiddle.net/PeeHaa/H34mM/
Another scenario is when a textarea is present inside the div: http://jsfiddle.net/h6Bhb/1/