Skip to content

Commit

Permalink
fix scroll issue
Browse files Browse the repository at this point in the history
  • Loading branch information
thabti committed Jan 15, 2017
1 parent f64f73f commit 0f164a6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/Audioplayer/MobilePlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import Track from './Track';
import Common from './CommonAudio';
import { disableScroll, enableScroll } from 'utils/scroll';
import { cleanUpBrackets } from 'utils/cleanUp';
import {
load,
Expand Down Expand Up @@ -151,11 +150,11 @@ class MobilePlayer extends Component {
if (!surah) return false;
const openPlayer = () => {
if (open) {
document.querySelector('html').style.overflow = 'hidden';
enableScroll();
} else {
document.querySelector('html').style.overflow = 'initial';
disableScroll();
document.querySelector('html').style.position = 'initial ';
} else {
document.querySelector('html').style.position = 'fixed';
document.querySelector('html').style.overflow = 'hidden';
}
this.setState({ open: !open });
};
Expand Down

0 comments on commit 0f164a6

Please sign in to comment.