Move selection bar to top when not needed.

By moving the selection bar to the top when it's not needed, we fix extraneous blank
spaces and scrollbars.

This provides fixes for:

* #9259
* #9252

and maybe #9197.
Merge pull request #9292 from adobe/dangoor/tree-scrolling

Move selection bar to top when not needed.