Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove submit blocking class on back button push
9f85120 added code to prevent double submits by adding a class when a submit button is clicked. Browser back buttons retrieve a cached page, so that class is still present and users cannot use any submit buttons on the page. It's not possible to detect a back button push directly, but some research confirms the popstate event is fired whenever the browser history is accessed, which happens when back is clicked. In testing, shortcut keys also access history and trigger popstate, so that case should be covered also. However, this event is not fired on WebKit based browsers when the user navigates back using the back button as described in https://bugs.webkit.org/show_bug.cgi?id=248303 So we are added also a listener to the pageshow event to ensure the submit blocking class is removed when the user navigates back on WebKit based browsers.
- Loading branch information