codedance / jquery.AreYouSure

A light-weight jQuery "dirty forms" Plugin - it monitors html forms and alerts users to unsaved changes if they attempt to close the browser or navigate away from the page. (Are you sure?)
507 stars 145 forks source link

Activating when using jquery submit form event #104

Closed stoyo closed 8 years ago

stoyo commented 8 years ago

I just came across this issue. I was trying to use textarea where the user types in some info and when hitting enter instead of adding new line, the form would be submitted. I managed to do that but jquery.AreYouSure activates as if the user is leaving the page, when he/ she is actually submitting the form.

codedance commented 8 years ago

OK. Any idea on how you think we should address this?

On 23 March 2016 at 00:14, Stoyan Genchev notifications@github.com wrote:

I just came across this issue. I was trying to use textarea where the user types in some info and when hitting enter instead of adding new line, the form would be submitted. I managed to do that but jquery.AreYouSure activates as if the user is leaving the page, when he/ she is actually submitting the form.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/codedance/jquery.AreYouSure/issues/104

Chris Dance http://www.papercut.com/ tel: +61 3 8376 8619 mob: +61 414 942 336 web: www.papercut.com

https://twitter.com/papercutdev https://facebook.com/papercutsoftware http://www.linkedin.com/company/papercut-software https://google.com/+PaperCutSoftware https://youtube.com/papercutsoftware

Please consider the environment before printing this email... or install PaperCut and let it do the considering for you!

stoyo commented 8 years ago

Well... I suppose you can try submitting a form with jquery instead of using a button, while using the jquery.AreYouSure package and tell me what happens or maybe suggest me a workaround, I don't know.