Commit 43a99bf4 authored by Mikael Salson's avatar Mikael Salson
Browse files

AnnotationFormManager.js: Correct bug when saving annotation with Ctrl+S

Fix #9
parent 13889f10
......@@ -336,16 +336,16 @@ function AnnotationFormManager(id_form) {
AnnotationFormManager.get.submitDelete();
});
save_shortcut = function (e) {
// Save with Ctrl+s
if (e.ctrlKey && (e.which === 115)) {
// Save with Ctrl+s or Ctrl+Enter
if (e.ctrlKey && (e.keyCode === 83 || e.keyCode == 13)) {
$("#" + id_form).submit();
return false;
}
};
this.$comm.keypress(save_shortcut);
this.$ex.keypress(save_shortcut);
this.$val.keypress(save_shortcut);
this.$nom.keypress(save_shortcut);
this.$comm.keydown(save_shortcut);
this.$ex.keydown(save_shortcut);
this.$val.keydown(save_shortcut);
this.$nom.keydown(save_shortcut);
this.initAskPropag();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment