Skip to content

Commit

Permalink
Merge pull request #386 from oliviertassinari/patch-2
Browse files Browse the repository at this point in the history
Prevent the dialog to lose scroll of the page
  • Loading branch information
hai-cea committed Mar 4, 2015
2 parents f1a55c1 + e4cdc1e commit 1b670a9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/js/dialog-window.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ var DialogWindow = React.createClass({
//allow scrolling
var body = document.getElementsByTagName('body')[0];
body.style.overflow = '';
body.style.position = '';
});

this.setState({ open: false });
Expand All @@ -89,7 +88,6 @@ var DialogWindow = React.createClass({
//prevent scrolling
var body = document.getElementsByTagName('body')[0];
body.style.overflow = 'hidden';
body.style.position = 'fixed';

this.setState({ open: true });
if (this.props.onShow) this.props.onShow();
Expand Down Expand Up @@ -177,4 +175,4 @@ var DialogWindow = React.createClass({

});

module.exports = DialogWindow;
module.exports = DialogWindow;

0 comments on commit 1b670a9

Please sign in to comment.