| @@ -82,10 +82,11 @@ | ||
| 82 | 82 | |
| 83 | 83 | // Get the parent form of the submit button. |
| 84 | 84 | const form = submitButton.closest('form'); |
| 85 | 85 | |
| 86 | - // Submit the form. | |
| 87 | - form.submit(); | |
| 86 | + // Submit the form, using requestSubmit() so any submit event listeners are honored | |
| 87 | + // e.g. the Member Content login form, which submits using AJAX. | |
| 88 | + form.requestSubmit(); | |
| 88 | 89 | } |
| 89 | 90 | |
| 90 | 91 | // Scope the function to the window object as webpack will wrap everything in a closure, |
| 91 | 92 | // resulting in the function not being available globally. |
| @@ -116,10 +117,11 @@ | ||
| 116 | 117 | if (!form) { |
| 117 | 118 | return; |
| 118 | 119 | } |
| 119 | 120 | |
| 120 | - // Submit the form. | |
| 121 | - form.submit(); | |
| 121 | + // Submit the form, using requestSubmit() so any submit event listeners are honored | |
| 122 | + // e.g. the Member Content login form, which submits using AJAX. | |
| 123 | + form.requestSubmit(); | |
| 122 | 124 | } |
| 123 | 125 | |
| 124 | 126 | // Scope the function to the window object as webpack will wrap everything in a closure, |
| 125 | 127 | // resulting in the function not being available globally. |