1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 01:16:52 +02:00

fix: ConfirmDocumentUnload

This commit is contained in:
Alexander Skvortsov
2020-08-09 23:41:39 -04:00
committed by Franz Liedke
parent ddb0a9f1ce
commit f93a255a2f

View File

@@ -24,11 +24,11 @@ export default class ConfirmDocumentUnload extends Component {
oncreate(vnode) {
super.oncreate(vnode);
$(window).on('beforeunload', this.handler);
$(window).on('beforeunload', this.handler.bind(this));
}
onremove(vnode) {
$(window).off('beforeunload', this.handler);
$(window).off('beforeunload', this.handler.bind(this));
}
view(vnode) {