A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
51.13k
stars
13.5k
forks
source link
bug: Swipe to dismiss not working properly on toast with customized ::part(container) css #29998
Closed
aeharding closed 1 week ago
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
I have some CSS to center the toast message with its icon. Here is the css:
With this CSS, I can no longer swipe to dismiss unless I start the swipe from over the
.toast-container
element:This is because the
ion-toast
haspointer-events: none
and it is reset on the.toast-container
element withpointer-events: auto
.Expected Behavior
Can swipe from anywhere on the toast, even with custom layout applied to
::part(container)
Steps to Reproduce
Code Reproduction URL
https://stackblitz.com/edit/kvqhk5
Ionic Info
Latest Ionic Stackblitz
Additional Information
This could be fixed by moving
pointer-events: auto
from.toast-container
to.toast-wrapper
. I will make a pr :)