Don't lose focus on input when using scrollbar
Don't lose focus on input when using scrollbar

This is a bit gnarly. When the focus is inside a node inside the scroll
view we must not have a tab index, because when we have one the browser
will blur the control and focus the scroll view if the user drags on the
scrollbar, and the focus should remain in the control.

However, when the focus is anywhere else, we do want the tab index, as
without it the browser won't focus the scroll view when you click in it,
which we want so that native keyboard shortcuts work correctly to scroll.

fastmail/overture