Skip to content

Commit

Permalink
Merge pull request #3788 from openstreetmap/tyrasd-unsavedchangesmess…
Browse files Browse the repository at this point in the history
…ageonsavedialog

Show "You have unsaved changes" message also in save mode
  • Loading branch information
bhousel authored Jan 23, 2017
2 parents 3246ca1 + ac8a529 commit 4d51f40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/core/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};

Expand Down

0 comments on commit 4d51f40

Please sign in to comment.