Skip to content

Commit

Permalink
feat: disable button on click
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Dec 12, 2023
1 parent 36e85dd commit 75aec43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/assets/passwordInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ document.getElementsByName("password").forEach((p) => {
})
}
})

document.querySelectorAll(`*[data-disable-on-click]`).forEach((p) => {
p.addEventListener("click", function () {
p.disabled = true
})
})
1 change: 1 addition & 0 deletions src/react-components/ory/user-logout-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const UserLogoutCard = ({
type="submit"
id="accept"
value="Yes"
data-disable-on-click
name="submit"
variant="semibold"
header={intl.formatMessage({
Expand Down

0 comments on commit 75aec43

Please sign in to comment.