From 7e189e39be47562fb7448aa97e53c3ae0d8d5405 Mon Sep 17 00:00:00 2001 From: Richard McCarthy Date: Fri, 27 Oct 2023 08:54:19 +0100 Subject: [PATCH] update logic --- src/components/button/button.js | 10 ++++++---- src/components/card/_card.scss | 2 +- src/scss/objects/_page.scss | 6 ++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/button/button.js b/src/components/button/button.js index 44a1f40c2b..0b3d28485e 100644 --- a/src/components/button/button.js +++ b/src/components/button/button.js @@ -50,11 +50,13 @@ export default class SubmitButton { } linkButtonKeyDown(event) { - if (event.keyCode == 32) { - event.preventDefault(); - this.button.click(); + if (event.keyCode == 32 || event.keyCode == 13) { + this.button.classList.add('active'); + if (event.keyCode == 32) { + event.preventDefault(); + this.button.click(); + } } - this.button.classList.add('active'); } linkButtonKeyUp(event) { diff --git a/src/components/card/_card.scss b/src/components/card/_card.scss index 627cfd5e26..c489c98ae9 100644 --- a/src/components/card/_card.scss +++ b/src/components/card/_card.scss @@ -11,7 +11,7 @@ & > .ons-card__title { margin-bottom: 0; } - } + } &__link:hover { text-decoration-thickness: 3px; diff --git a/src/scss/objects/_page.scss b/src/scss/objects/_page.scss index e2c6f2ae2c..896aa42baf 100644 --- a/src/scss/objects/_page.scss +++ b/src/scss/objects/_page.scss @@ -21,13 +21,11 @@ @include mq(xxs, m) { margin-top: 1.5rem; } - } // Adjust margin-top when .ons-page__main contains .ons-panel--error */ -.ons-breadcrumbs ~ .ons-grid .ons-grid__col .ons-page__main:has(.ons-panel--error){ - margin-top: 1rem; - +.ons-breadcrumbs ~ .ons-grid .ons-grid__col .ons-page__main:has(.ons-panel--error) { + margin-top: 1rem; } .ons-page__body {