Skip to content

Commit

Permalink
Add preventDefault to forms
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jul 27, 2024
1 parent 510e205 commit e5915c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/loginhelper/pages/cookies.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</style>
</head>
<body>
<form onsubmit="saveToCookies()">
<form onsubmit="event.preventDefault();saveToCookies()">
<div>
<label for="username">Username:</label>
<input type="text" id="username" placeholder="Username"/>
Expand Down
2 changes: 1 addition & 1 deletion cmd/loginhelper/pages/daw_submit.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</style>
</head>
<body>
<form onsubmit="submitToWaiter()">
<form onsubmit="event.preventDefault();submitToWaiter()">
<div>
<label for="reqid">Request ID:</label>
<input type="text" id="reqid" oninput="this.value = normalizeCrockfordBase32(this.value)"
Expand Down
2 changes: 1 addition & 1 deletion cmd/loginhelper/pages/localstorage.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</style>
</head>
<body>
<form onsubmit="saveToLocalstorage()">
<form onsubmit="event.preventDefault();saveToLocalstorage()">
<div>
<label for="username">Username:</label>
<input type="text" id="username" placeholder="Username"/>
Expand Down

0 comments on commit e5915c3

Please sign in to comment.