Using "pageshow" Event To Re-enable Forms After Back-Button Navigation
bennadel.com·1d
Flag this post

In Big Sexy Poems, I have an Alpine.js directive that binds to my ColdFusion forms, listens for the submit event, and prevents accidental double-submission by setting a flag and disabling the submit button(s). After I started using this directive, I noticed that my forms would remain disabled when I navigated back to them using the browser’s Back Button. This is because the browser pulls the ColdFusion form page out of the “bfcache”, which re-renders whatever state the page was in at the previou…

Similar Posts

Loading similar posts...