Skip to content

Commit

Permalink
fix: force lock body scroll on scroll-free systems. fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed May 4, 2019
1 parent 650f400 commit c9c3209
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 4 additions & 5 deletions example/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ const PDiv = () => (
}}
// className={zeroRightClassName}
>
XXX
XXX
XXX
PORTALED SCROLLABLE
{fill(20, 1).map(x => <p>{x}****</p>)}
</div>
);
Expand Down Expand Up @@ -83,7 +81,7 @@ export default class App extends Component <{}, AppState> {
}}
// className={zeroRightClassName}
>
SCROLL!!!
SCROLL (end of content would be hidden under "parent" scroll).
{(<RemoveScroll enabled={true}>
<div
style={{
Expand All @@ -99,6 +97,7 @@ export default class App extends Component <{}, AppState> {
}}
// className={zeroRightClassName}
>
PRIMARY SCROLLABLE
YY
ZZZ
AAAA
Expand Down Expand Up @@ -191,7 +190,7 @@ export default class App extends Component <{}, AppState> {
</>
)}

<p>FILL</p>
<p>FILLER (not scrollable)</p>
{fill(100, 1).map((x, index) => <p>{index}**** </p>)}
<p>END</p>
</AppWrapper>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
],
"repository": "https://github.com/theKashey/react-remove-scroll",
"dependencies": {
"react-remove-scroll-bar": "^1.1.3",
"react-remove-scroll-bar": "^1.1.5",
"tslib": "^1.0.0"
},
"sideEffects": false
Expand Down
9 changes: 5 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8017,12 +8017,13 @@ react-is@^16.3.1, react-is@^16.6.1, react-is@^16.7.0:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.7.0.tgz#c1bd21c64f1f1364c6f70695ec02d69392f41bfa"
integrity sha512-Z0VRQdF4NPDoI0tsXVMLkJLiwEBa+RP66g0xDHxgxysxSoCUccSten4RTF/UFvZF1dZvZ9Zu1sx+MDXwcOR34g==

react-remove-scroll-bar@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-1.1.3.tgz#21eb49a0cc9628746d2b624880fb272a3541866a"
integrity sha512-mEPbImnGIxv+PyVTpeuGhWVl2aAQgSpB2yX4lL6ttsjT/XVVZwyPiz4gnCxBPoWYniQBLTL1IjZ/rrQLT9ZIJg==
react-remove-scroll-bar@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-1.1.5.tgz#f129cf159163f27da72e87a046882768dd31fa89"
integrity sha512-h2484atf4ayDOQS0rnw6UwWpwEX6abV+fC7ClMOpdNmbE9K0XTcj7YrknSOaP5h9prWT/uhUK7XZbV/17gTJdw==
dependencies:
react-style-singleton "^1.1.0"
tslib "^1.0.0"

react-style-singleton@^1.1.0:
version "1.1.0"
Expand Down

0 comments on commit c9c3209

Please sign in to comment.