Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(overlays): exclude backdrop-no-scroll class when toast is presented #30123

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tobiloeb
Copy link

@tobiloeb tobiloeb commented Jan 9, 2025

Issue number: resolves #30112


What is the current behavior?

When toast is presented, the backdrop-no-scroll class is added to the body when using Frameworks like Angular. It should not add this class as toast does not be setting focus trap as mentioned in the comments.

What is the new behavior?

  • Class is only added when the overlay that is presented is not a toast component.
  • Test was added.

Does this introduce a breaking change?

  • Yes
  • No

Other information

N/A

In case last overlay is a toast, the backdrop-no-scroll css class is removed from body.

closes ionic-team#30112
@tobiloeb tobiloeb requested a review from a team as a code owner January 9, 2025 09:52
@tobiloeb tobiloeb requested a review from joselrio January 9, 2025 09:52
Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 25, 2025 11:23pm

@github-actions github-actions bot added the package: core @ionic/core package label Jan 9, 2025
@thetaPC thetaPC removed the request for review from joselrio March 21, 2025 20:29
@thetaPC thetaPC changed the title fix(toast): remove backdrop-no-scroll for last toast overlay fix(overlays): remove backdrop-no-scroll class after last overlay is dismissed Mar 21, 2025
@thetaPC thetaPC changed the title fix(overlays): remove backdrop-no-scroll class after last overlay is dismissed fix(overlays): exclude backdrop-no-scroll class when toast is presented Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: ion-toast does not remove backdrop-no-scroll from body when dismiss
2 participants