Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Added stop propagation to stop bubbling the token generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGhostHunter committed Apr 8, 2020
1 parent f538de0 commit 7010c8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/views/script.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
.filter((form) => form.dataset.recaptcha === 'true')
.forEach((form) => {
let action = form.action.includes('://') ? (new URL(form.action)).pathname : form.action;
form.addEventListener('submit', () => {
form.addEventListener('submit', (event) => {
event.stopPropagation();
grecaptcha.execute(site_key, {
action: action
.substring(action.indexOf('?'), action.length)
Expand Down

0 comments on commit 7010c8b

Please sign in to comment.