mui / mui/material-ui

[Modal] Issue with overflow-y: scroll on <html>

Open
#34,513 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

accessibility scope: modal type: new feature
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Summary 💡

Add scrollContainer to support custom scroll lock containers.

Examples 🌈

Our product is a browser plugin that enables some features on social platforms. We have implemented some features on Twitter and used dialog. But since twitter implements overflow on the html node.

image
Motivation 🔦

However, scrollLock currently only works on the body node. And developers cannot customize the nodes that require scroll lock.

So I implemented a simple patch.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Modal component's existing scrollLock behavior and the linked Maskbook patch for the proposed scrollContainer API. Done means Modal can apply scroll locking to a developer-selected container, including the html element, rather than only body; add or update coverage for that behavior if the existing Modal tests are found.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.