We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6d72095 + e799711 commit 6ba75e4Copy full SHA for 6ba75e4
packages/app/app/App.js
@@ -67,9 +67,16 @@ class App extends React.PureComponent {
67
68
this.updateConnectivityStatus(navigator.onLine);
69
window.addEventListener('online', () => this.updateConnectivityStatus(true));
70
- window.addEventListener('offline', () => this.updateConnectivityStatus(false));
+ window.addEventListener('offline', () => this.updateConnectivityStatus(false));
71
+ window.addEventListener('auxclick', this.blockMiddleClick);
72
}
73
74
+ blockMiddleClick = (e) => {
75
+ // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
76
+ if (e.button === 1) {
77
+ e.preventDefault();
78
+ }
79
80
updateConnectivityStatus = (isConnected) => {
81
this.props.actions.changeConnectivity(isConnected);
82
0 commit comments