Skip to content

Commit

Permalink
Block auxiliary clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
waldo121 committed Sep 13, 2024
1 parent 6d72095 commit e36a8cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/app/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ class App extends React.PureComponent {

this.updateConnectivityStatus(navigator.onLine);
window.addEventListener('online', () => this.updateConnectivityStatus(true));
window.addEventListener('offline', () => this.updateConnectivityStatus(false));
window.addEventListener('offline', () => this.updateConnectivityStatus(false));
window.addEventListener('auxclick', this.blockAuxiliaryClick);
}

blockAuxiliaryClick = (e) => e.preventDefault()
updateConnectivityStatus = (isConnected) => {
this.props.actions.changeConnectivity(isConnected);
}
Expand Down

0 comments on commit e36a8cc

Please sign in to comment.