File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " rc-drawer-menu" ,
3
- "version" : " 0.3.1 " ,
3
+ "version" : " 0.3.2 " ,
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 @@ -153,9 +153,19 @@ class Drawer extends React.PureComponent {
153
153
return doms [ doms . length - 1 ] ;
154
154
}
155
155
156
+ getIsButtonDom = ( dom ) => {
157
+ if ( dom . className === `${ this . props . className } -button` ) {
158
+ return true ;
159
+ }
160
+ if ( dom . parentNode ) {
161
+ return this . getIsButtonDom ( dom . parentNode ) ;
162
+ }
163
+ return false ;
164
+ }
165
+
156
166
removeScroll = ( e ) => {
157
167
const dom = e . target ;
158
- if ( dom . className === `${ this . props . className } -bg` ) {
168
+ if ( dom . className === `${ this . props . className } -bg` || this . getIsButtonDom ( dom ) ) {
159
169
e . preventDefault ( ) ;
160
170
e . returnValue = false ;
161
171
return ;
You can’t perform that action at this time.
0 commit comments