preventing user from leaving page if there is any filled input[text]