From 470decca7b6b89ef74095ef0bb7909b93640cd78 Mon Sep 17 00:00:00 2001 From: Alexander Harding Date: Thu, 14 Nov 2024 10:39:02 -0600 Subject: [PATCH] fix(toast): swipe gesture works with custom container layout (#29999) Issue number: resolves #29998 --------- ## What is the current behavior? Applying a custom layout to `ion-toast::part(container)`, for example `width: 50%`, will make the part of the toast outside this element's bounds non-interactive for swiping gestures. ## What is the new behavior? Can swipe from anywhere on the toast with custom layout applied to ::part(container) ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Other information | Before | After | |-------|-----------------------------------------------------| | | | --- core/src/components/toast/toast.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/components/toast/toast.scss b/core/src/components/toast/toast.scss index 2b94cf94d90..2c8398a3594 100644 --- a/core/src/components/toast/toast.scss +++ b/core/src/components/toast/toast.scss @@ -97,6 +97,8 @@ background: var(--background); box-shadow: var(--box-shadow); + + pointer-events: auto; } .toast-wrapper.toast-top { @@ -115,7 +117,6 @@ display: flex; align-items: center; - pointer-events: auto; height: inherit; min-height: inherit;