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?)
508
stars
145
forks
source link
Clicking fast on the same link after pressing "stay" with not trigger the alert anymore #136
After I click a button or close and the alert pups-up, I press "stay" than immediately press the same button the alert does not pop-up anymore. and the browser let's me leave without any alert.
But if I wait for a second or two then the alert works again.
Yeah, I had the same issue, it's because there is a delay 900 milliseconds,
window.setTimeout(function () { window.aysHasPrompted = false; }, 900);
So you can manually change it to 0 and that's ok
After I click a button or close and the alert pups-up, I press "stay" than immediately press the same button the alert does not pop-up anymore. and the browser let's me leave without any alert.
But if I wait for a second or two then the alert works again.