If we click on a sidebar item to collapse it, the focus remains on the sidebar item list and pressing the up/down arrow, j, k or page up/down key doesn't scroll the document, instead iterates through the sidebar items. Applying this patch, the focus shifts to the document on collapsing the sidebar.
If the sidebar is collapsed when the document is not opened, the focus shifts away from it.
BUG: 213508
FIXED-IN: 1.8.0