Fix ruler scroll event bug