Skip to content

Stop scrolling body when element selector is open#16768

Merged
brandonkelly merged 6 commits into4.15from
bugfix/cms-16759-no-scroll-modal
Feb 28, 2025
Merged

Stop scrolling body when element selector is open#16768
brandonkelly merged 6 commits into4.15from
bugfix/cms-16759-no-scroll-modal

Conversation

@brianjhanson
Copy link
Copy Markdown
Contributor

@brianjhanson brianjhanson commented Feb 24, 2025

Mimics the no-scroll behavior of slideouts for element selector modals

Related issues

Fixes #16759

@brandonkelly
Copy link
Copy Markdown
Member

Does the issue only affect element selector modals? I assume the changes should be made on Garnish.Modal and Craft.Slideout.

@brianjhanson
Copy link
Copy Markdown
Contributor Author

Yeah, I think you're right. I was nervous about changing it too broadly, but I don't see anywhere we're using Garnish.Modal where we don't want to lock the body.

As for Slideout, that already has code to manage the no-scroll.

@brandonkelly brandonkelly merged commit 0876047 into 4.15 Feb 28, 2025
@brandonkelly brandonkelly deleted the bugfix/cms-16759-no-scroll-modal branch February 28, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants