Fix beforeunload dialog
undefined should be returned in beforeunload event callback no to ask user for confirmation of page reload. Closes-Bug: #1642949 Change-Id: I99e196376d408d8ac40ac383a0a697a6d14fd3b9
This commit is contained in:
parent
24866201ec
commit
c9a2b3186c
@ -37,8 +37,10 @@ export function dispatcherMixin(events, callback) {
|
||||
|
||||
export var unsavedChangesMixin = {
|
||||
onBeforeunloadEvent() {
|
||||
return this.hasChanges() &&
|
||||
(_.result(this, 'getStayMessage') || i18n('dialog.dismiss_settings.default_message'));
|
||||
return this.hasChanges() ?
|
||||
_.result(this, 'getStayMessage') || i18n('dialog.dismiss_settings.default_message')
|
||||
:
|
||||
undefined;
|
||||
},
|
||||
componentWillMount() {
|
||||
this.eventName = _.uniqueId('unsavedchanges');
|
||||
|
Loading…
Reference in New Issue
Block a user