jossmac / jossmac/react-images

preventScroll not working in v1

Open
#310 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.3k
Forks
433
PR merge metrics
No merged PRs in 30d

Description

Good day,

In versions 0.x I had to set the prop below to stop the page from scrolling to the top whenever the lightbox was opened. This prop has a default value of true.

```
preventScroll={false}
```

Unfortunately, this trick no longer works in v1 so even with this prop set I'm still experiencing the automatic scroll to the top of the page.

Is anyone else experiencing this?

Here is my JSX:

```

{this.state.lightboxIsOpen && (



)}

```

Cheers,

Alec

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.