mirror of
https://github.com/edumeet/edumeet.git
synced 2026-07-30 06:20:39 +00:00
Attempt fixing scrolling by preventing touchmove events
This commit is contained in:
parent
b605e053f0
commit
bf4a2e489f
1 changed files with 8 additions and 0 deletions
|
|
@ -49,16 +49,24 @@ class Room extends React.Component
|
|||
this.waitForHide();
|
||||
}
|
||||
|
||||
handleTouchMove = (event) =>
|
||||
{
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
|
||||
componentDidMount()
|
||||
{
|
||||
window.addEventListener('mousemove', this.handleMovement);
|
||||
window.addEventListener('touchstart', this.handleMovement);
|
||||
document.body.addEventListener('touchmove', this.handleTouchMove, false);
|
||||
}
|
||||
|
||||
componentWillUnmount()
|
||||
{
|
||||
window.removeEventListener('mousemove', this.handleMovement);
|
||||
window.removeEventListener('touchstart', this.handleMovement);
|
||||
document.body.removeEventListener('touchmove', this.handleTouchMove);
|
||||
}
|
||||
|
||||
render()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue