Added 20px threshold to autoscroll detection