Merge pull request #35 from torjusti/develop

Show floating action buttons on mobile after touchstart
master
Stefan Otto 2018-07-25 15:13:35 +02:00 committed by GitHub
commit 479ebcf92a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -34,7 +34,7 @@ class Room extends React.Component
this.props.setToolbarsVisible(false);
}, TIMEOUT);
handleMouseMove = () =>
handleMovement = () =>
{
// If the toolbars were hidden, show them again when
// the user moves their cursor.
@ -48,12 +48,14 @@ class Room extends React.Component
componentDidMount()
{
window.addEventListener('mousemove', this.handleMouseMove);
window.addEventListener('mousemove', this.handleMovement);
window.addEventListener('touchstart', this.handleMovement);
}
componentWillUnmount()
{
window.removeEventListener('mousemove', this.handleMouseMove);
window.removeEventListener('mousemove', this.handleMovement);
window.removeEventListener('touchstart', this.handleMovement);
}
render()