Skip to content

Commit

Permalink
fix(toast): swipe gesture works with custom container layout (#29999)
Browse files Browse the repository at this point in the history
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>
|
  • Loading branch information
aeharding authored Nov 14, 2024
1 parent 3216108 commit 470decc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/components/toast/toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@
background: var(--background);

box-shadow: var(--box-shadow);

pointer-events: auto;
}

.toast-wrapper.toast-top {
Expand All @@ -115,7 +117,6 @@
display: flex;

align-items: center;
pointer-events: auto;

height: inherit;
min-height: inherit;
Expand Down

0 comments on commit 470decc

Please sign in to comment.