From 360b6497e414f6d3a6dd2aee3258557ab72f61cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Silke=20Gr=C3=BCber?= <57660644+SGrueber@users.noreply.github.com> Date: Mon, 26 Oct 2020 09:20:01 +0100 Subject: [PATCH] fix: submit a promotion code by pressing enter (#436) --- .../product-add-to-order-template.component.html | 2 +- .../product-add-to-wishlist.component.html | 2 +- .../basket-promotion-code/basket-promotion-code.component.html | 3 ++- .../basket-promotion-code/basket-promotion-code.component.ts | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/extensions/order-templates/shared/product-add-to-order-template/product-add-to-order-template.component.html b/src/app/extensions/order-templates/shared/product-add-to-order-template/product-add-to-order-template.component.html index 5d6d50b924..38020e7682 100644 --- a/src/app/extensions/order-templates/shared/product-add-to-order-template/product-add-to-order-template.component.html +++ b/src/app/extensions/order-templates/shared/product-add-to-order-template/product-add-to-order-template.component.html @@ -1,6 +1,6 @@ diff --git a/src/app/shared/components/basket/basket-promotion-code/basket-promotion-code.component.ts b/src/app/shared/components/basket/basket-promotion-code/basket-promotion-code.component.ts index b6afa81395..28aa73abef 100644 --- a/src/app/shared/components/basket/basket-promotion-code/basket-promotion-code.component.ts +++ b/src/app/shared/components/basket/basket-promotion-code/basket-promotion-code.component.ts @@ -61,6 +61,8 @@ export class BasketPromotionCodeComponent implements OnInit, OnDestroy { this.lastEnteredPromoCode = this.codeInput.value; } this.checkoutFacade.addPromotionCodeToBasket(this.codeInput.value); + // prevent further form submit + return false; } ngOnDestroy() {