Patch for T45197. Fixes the "emtpy scrolling" glitch by clamping the scroller offset to the boundary of the view when it's smaller than the previous.
Tested:
- Changing the selected object in properties editor
- Changing the selected object for n-panels
- Breaking the draw() code in a panel
- Horizontal properties editor
- Changing layers in 3D View with the graph editor open