You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue number: resolves#29998
---------
<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->
<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->
## 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
<!--
If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->
## Other information
| Before | After |
|-------|-----------------------------------------------------|
| <video
src="https://github.com/user-attachments/assets/fc450066-5fb1-4fd9-bfbd-7f2cd55ce855"></video>
| <video
src="https://github.com/user-attachments/assets/991f6a42-f6fe-479b-9f68-7e7e35dca799"></video>
|
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 :)The text was updated successfully, but these errors were encountered: