Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit 1ea9b38

Browse files
committed
Improve form onsubmit fix for IE
1 parent feb4f14 commit 1ea9b38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

themes/material/core/loginuserpass.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ function onRecaptchaLoad() {
3333
});
3434
}
3535

36+
function preventDefault(event) {
37+
event.preventDefault();
38+
}
39+
3640
ga('send', 'event', 'reCAPTCHA', 'required');
3741
</script>
3842
<?php
@@ -44,7 +48,7 @@ function onRecaptchaLoad() {
4448
<main class="mdl-layout__content" layout-children="column" child-spacing="center">
4549
<?php include __DIR__ . '/../common-announcement.php' ?>
4650

47-
<form method="post" autocomplete="off" onsubmit="function changeSubmit(event) { event.target.onsubmit = pd(event); function pd(e) { e.preventDefault() }}">
51+
<form method="post" autocomplete="off" onsubmit="event.target.onsubmit = preventDefault">
4852
<input type="hidden" name="AuthState" value="<?= htmlentities($this->data['stateparams']['AuthState']) ?>" />
4953

5054
<?php

0 commit comments

Comments
 (0)