🐛 fix bug critique sur firefox < 58 qui causait une page blanche
parent
d6b4098d4e
commit
3ac18b04c8
|
@ -52,11 +52,17 @@ export class ScrollToElement extends Component {
|
|||
) {
|
||||
return
|
||||
}
|
||||
this.ref.scrollIntoView({
|
||||
behavior: this.props.behavior,
|
||||
block: 'nearest',
|
||||
inline: 'nearest'
|
||||
})
|
||||
try {
|
||||
this.ref.scrollIntoView({
|
||||
behavior: this.props.behavior,
|
||||
block: 'nearest',
|
||||
inline: 'nearest'
|
||||
})
|
||||
} catch (error) {
|
||||
this.ref.scrollIntoView({
|
||||
behavior: this.props.behavior
|
||||
})
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
this.scrollIfNeeded()
|
||||
|
|
Loading…
Reference in New Issue