From ac8a52980b6d13199911817df5f4768c3e4be7e0 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Sun, 22 Jan 2017 19:28:39 +0100 Subject: [PATCH] show "You have unsaved changes" message also in save mode --- modules/core/context.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/core/context.js b/modules/core/context.js index e2f49a15f..b756c1cb5 100644 --- a/modules/core/context.js +++ b/modules/core/context.js @@ -131,8 +131,9 @@ export function coreContext() { }; context.save = function() { - if (inIntro || (mode && mode.id === 'save') || d3.select('.modal').size()) return; - history.save(); + if (inIntro || d3.select('.modal').size()) return; + if (!(mode && mode.id === 'save')) + history.save(); if (history.hasChanges()) return t('save.unsaved_changes'); };