From 8c3057a84757706c531f9c75e29ae25b5bbfd9cc Mon Sep 17 00:00:00 2001 From: Marc Lucraft Date: Wed, 17 Apr 2024 16:33:21 +0100 Subject: [PATCH 1/2] Fixes two long standing minor bugs - Warning in console: [Deprecation] The keyword 'push-button' specified to an 'appearance' property is not standardized. It will be removed in the future. */ - Adds type="button" to the Custom Link Button. This prevents this button submitting if included in a form. --- src/page/stylesheets/reset.scss | 2 +- src/shared/managers/CustomLinkManager.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/page/stylesheets/reset.scss b/src/page/stylesheets/reset.scss index 1fbcad296..63e97b1e5 100755 --- a/src/page/stylesheets/reset.scss +++ b/src/page/stylesheets/reset.scss @@ -490,7 +490,7 @@ font-family: arial, helvetica, sans-serif; font-size: small; background: white; - -webkit-appearance: push-button; + appearance: button; /* [Deprecation] The keyword 'push-button' specified to an 'appearance' property is not standardized. It will be removed in the future. */ color: buttontext; border: 1px #a6a6a6 solid; background: lightgrey; /* Old browsers */ diff --git a/src/shared/managers/CustomLinkManager.ts b/src/shared/managers/CustomLinkManager.ts index 87deddd1c..fa900c286 100644 --- a/src/shared/managers/CustomLinkManager.ts +++ b/src/shared/managers/CustomLinkManager.ts @@ -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); } } From b3d802a0c1d2e2b25ee0a59996f11ad3a3ca9e13 Mon Sep 17 00:00:00 2001 From: Marc Lucraft Date: Wed, 17 Apr 2024 17:01:48 +0100 Subject: [PATCH 2/2] remove necessary comment in css. --- src/page/stylesheets/reset.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/page/stylesheets/reset.scss b/src/page/stylesheets/reset.scss index 63e97b1e5..81c8188ab 100755 --- a/src/page/stylesheets/reset.scss +++ b/src/page/stylesheets/reset.scss @@ -490,7 +490,7 @@ font-family: arial, helvetica, sans-serif; font-size: small; background: white; - appearance: button; /* [Deprecation] The keyword 'push-button' specified to an 'appearance' property is not standardized. It will be removed in the future. */ + appearance: button; color: buttontext; border: 1px #a6a6a6 solid; background: lightgrey; /* Old browsers */