Enlève la scrollbar à l'iframe pour éviter les scintillement et les double scrollbar
parent
f3edfa27bb
commit
7ce383b5df
|
@ -7,8 +7,8 @@
|
|||
}
|
||||
html:fullscreen {
|
||||
background-color: white;
|
||||
overflow: auto !important;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import { Component } from 'react'
|
||||
|
||||
export default class DisableScroll extends Component {
|
||||
componentDidMount() {
|
||||
console.log(document.documentElement)
|
||||
document.documentElement.style.overflow = 'hidden'
|
||||
}
|
||||
componentWillUnmount() {
|
||||
document.documentElement.style.overflow = ''
|
||||
}
|
||||
render() {
|
||||
return null
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import Mecanisms from 'Components/Mecanisms'
|
||||
import RulePage from 'Components/RulePage'
|
||||
import DisableScroll from 'Components/utils/DisableScroll'
|
||||
import TrackPageView from 'Components/utils/TrackPageView'
|
||||
import React, { Component } from 'react'
|
||||
import { Redirect, Route, Switch } from 'react-router-dom'
|
||||
|
@ -33,6 +34,7 @@ class EmbaucheRoute extends Component {
|
|||
onStoreCreated={persistSimulation}>
|
||||
<TrackPageView />
|
||||
{!inIframe() && <Header />}
|
||||
{inIframe() && <DisableScroll />}
|
||||
<Switch>
|
||||
<Route exact path="/" component={Home} />
|
||||
<Route path="/contact" component={Contact} />
|
||||
|
|
Loading…
Reference in New Issue