Fixed scrolling on client side js when connection closes