Don't use the same keybind id for modeSave (esc dialog) and uiSave (Ctrl+S)

(closes #4728)
This commit is contained in:
Bryan Housel
2018-01-24 13:46:01 -05:00
parent 684a9414de
commit 300616819d
2 changed files with 6 additions and 5 deletions

View File

@@ -47,7 +47,7 @@ var _isSaving = false;
export function modeSave(context) {
var mode = { id: 'save' };
var keybinding = d3_keybinding('save');
var keybinding = d3_keybinding('modeSave');
var loading = uiLoading(context)
.message(t('save.uploading'))

View File

@@ -16,12 +16,13 @@ import { tooltip } from '../util/tooltip';
export function uiSave(context) {
var history = context.history(),
key = uiCmd('⌘S');
var history = context.history();
var key = uiCmd('⌘S');
function saving() {
return context.mode().id === 'save';
var mode = context.mode();
return mode && mode.id === 'save';
}
@@ -100,7 +101,7 @@ export function uiSave(context) {
updateCount();
var keybinding = d3_keybinding('save')
var keybinding = d3_keybinding('uiSave')
.on(key, save, true);
d3_select(document)