Skip to content

Commit

Permalink
Merge pull request #1170 from marclucraft/main
Browse files Browse the repository at this point in the history
[Fix] Replace deprecated CSS 'push-button'. Adds type='button' to Custom Link Prompt.
  • Loading branch information
jkasten2 authored Apr 17, 2024
2 parents 0b7ff68 + b3d802a commit 5c4c81e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/page/stylesheets/reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@
font-family: arial, helvetica, sans-serif;
font-size: small;
background: white;
-webkit-appearance: push-button;
appearance: button;
color: buttontext;
border: 1px #a6a6a6 solid;
background: lightgrey; /* Old browsers */
Expand Down
4 changes: 4 additions & 0 deletions src/shared/managers/CustomLinkManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ export class CustomLinkManager {
await this.handleClick(subscribeButton);
});

// Adds type="button" to the Custom Link Button.
// This prevents this button submitting if included in a form.
subscribeButton.setAttribute('type', 'button');

element.appendChild(subscribeButton);
}
}
Expand Down

0 comments on commit 5c4c81e

Please sign in to comment.