-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.9.14, 3.11.7, 4.0.1, 4.1.2
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
The JavaScript code to prevent double submission of forms (lib/form/amd/src/submit.js) seems not to work reliable under Safari. The feature was introduced with MDL-38555. I noticed the bug while working on MDL-75083.
With Safari it is (sometimes?!) possible to double submit Moodle forms. The submit button is not disabled as it should be after the first submit. This can be tested by creating a forum post for example.
A little more testing and added debug output to the submit.js showed that the problem is caused by a race condition between the beforeunload event fired by the browser and setTimout(function, 0). Looks like Safari is a little slower than other browsers firing the beforeunload event. See the attached screenshots.
Tested under macOS Big Sur (11.6) and Safari 15.0 (166612.1.29.51.4, 16612)
- Discovered while testing
-
MDL-75083 Login form double submission leads to invalid login
- Closed
- has been marked as being related by
-
MDL-77398 After downloading selected submissions the "Go" button of the "With selected" form becomes inactive
- Closed
- is duplicated by
-
MDL-77188 Duplicate activity instances created when using ios safari
- Closed