Skip to content

Commit ca29878

Browse files
committed
fix modal force unrender bug
1 parent 65040e5 commit ca29878

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

components/SLDSModal/index.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ module.exports = React.createClass( {
101101
}
102102
},
103103

104+
clearBodyScroll: function updateBodyScroll() {
105+
if (window && document && document.body) {
106+
document.body.style.overflow = 'inherit';
107+
}
108+
},
109+
104110
handleModalClick(event) {
105111
if(event && event.stopPropagation){
106112
event.stopPropagation();
@@ -252,6 +258,10 @@ module.exports = React.createClass( {
252258
}
253259

254260

261+
},
262+
263+
componentWillUnmount () {
264+
this.clearBodyScroll();
255265
}
256266

257267

0 commit comments

Comments
 (0)