We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97bfd1c commit 3f6a722Copy full SHA for 3f6a722
src/app/containers/angular-tetris/angular-tetris.component.ts
@@ -71,6 +71,14 @@ export class AngularTetrisComponent implements OnInit {
71
this[`keyUp${key}`]();
72
}
73
74
+ @HostListener('window:beforeunload', ['$event'])
75
+ unloadHandler(event: Event) {
76
+ if (!!this._tetrisQuery.current) {
77
+ event.preventDefault();
78
+ event.returnValue = true;
79
+ }
80
81
+
82
@HostListener(`${KeyDown}.${TetrisKeyboard.Left}`)
83
keyDownLeft() {
84
this._soundManager.move();
0 commit comments