Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Modal Dialog's "scroll lock" is incorrect #25

@theKashey

Description

@theKashey

Modal dialog on mounting is setting overflow:hidden directly on body, and remove it on unmount.
Don't do that :)

Problems:

  1. What if you have two modals? It will "unlock" scroll after the first unmount.
  2. It will hide scroll bar on windows machines, casing content to "jump"
  3. It does not work for mobile safari at all 😺

https://github.com/theKashey/react-scroll-locky will do the job

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions