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

Commit cec271e

Browse files
committed
replace ScrollLock with TouchScrollable to enable drawer scrolling on mobile
1 parent 999ab9d commit cec271e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/overlay/src/components/Overlay.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ import { Component } from 'react';
66
import type { Node } from 'react';
77

88
import PropTypes from 'prop-types';
9-
import ScrollLock from 'react-scrolllock';
109
import isFunction from 'lodash/isFunction';
10+
import { TouchScrollable } from 'react-scrolllock';
1111
import { CSSTransition } from 'react-transition-group';
1212

13-
import Portal from '../../../portal';
1413
import { OverlayInnerContainer, OverlayOuterContainer } from './styled/StyledOverlayComponents';
1514

15+
import Portal from '../../../portal';
16+
1617
type Props = {
1718
children ? :Node;
1819
isScrollable ?:boolean;
@@ -80,13 +81,13 @@ export default class Overlay extends Component<Props> {
8081
timeout={200}
8182
classNames="luk-fade">
8283
<Portal>
83-
<ScrollLock>
84+
<TouchScrollable>
8485
<OverlayOuterContainer transparent={transparent}>
8586
<OverlayInnerContainer isScrollable={isScrollable} onClick={this.handleOnClick}>
8687
{ children }
8788
</OverlayInnerContainer>
8889
</OverlayOuterContainer>
89-
</ScrollLock>
90+
</TouchScrollable>
9091
</Portal>
9192
</CSSTransition>
9293
);

0 commit comments

Comments
 (0)