I need to scroll into div
inside other div.
I'm using scrollIntoView
, the problem is that even if div is fully visible scrollIntoView
still scrolls into element so element is align to the top of parent div.
This is causing "jumping" effect each time I focus, even if element is fully visible. See below example: pressing C should not scroll at all only pressing G ;) should.
https://codepen.io/kheim/pen/gWmwKj
I was wondering if there is a way to scroll into element only if it's not fully visible.
Trying this on Chrome 55+.
Thanks!