Fix 'panel scrolling when selecting text' bug