Fix js onbeforeunload, when click on submit button