File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " rc-drawer-menu" ,
3
- "version" : " 0.5.0 " ,
3
+ "version" : " 0.5.1 " ,
4
4
"description" : " drawer menu animation component for react" ,
5
5
"keywords" : [
6
6
" react" ,
Original file line number Diff line number Diff line change @@ -175,7 +175,8 @@ class Drawer extends React.PureComponent {
175
175
176
176
removeScroll = ( e ) => {
177
177
const dom = e . target ;
178
- if ( dom . className === `${ this . props . className } -bg` || this . getIsButtonDom ( dom ) ) {
178
+ const scrollDom = this . getScollDom ( dom ) ;
179
+ if ( dom . className === `${ this . props . className } -bg` || this . getIsButtonDom ( dom ) || ! scrollDom ) {
179
180
e . preventDefault ( ) ;
180
181
e . returnValue = false ;
181
182
return ;
@@ -192,10 +193,6 @@ class Drawer extends React.PureComponent {
192
193
y = this . mousePos . y - touches . pageY ;
193
194
x = this . mousePos . x - touches . pageX ;
194
195
}
195
- const scrollDom = this . getScollDom ( dom ) ;
196
- if ( ! scrollDom ) {
197
- return ;
198
- }
199
196
// 竖向
200
197
const scrollTop = scrollDom . scrollTop ;
201
198
const height = scrollDom . clientHeight ;
You can’t perform that action at this time.
0 commit comments