fix #301: inline generator keyboard management

This commit is contained in:
antelle 2016-08-14 19:40:44 +03:00
parent f94493a82c
commit e88de37314
2 changed files with 6 additions and 1 deletions

View File

@ -125,8 +125,9 @@ var FieldViewText = FieldView.extend({
var code = e.keyCode || e.which;
if (code === Keys.DOM_VK_RETURN) {
if (!this.model.multiline || (!e.altKey && !e.shiftKey && !e.ctrlKey)) {
let value = this.gen ? this.gen.password : e.target.value;
this.stopListening(Backbone, 'click', this.fieldValueBlur);
this.endEdit(e.target.value);
this.endEdit(value);
}
} else if (code === Keys.DOM_VK_ESCAPE) {
this.stopListening(Backbone, 'click', this.fieldValueBlur);
@ -135,6 +136,9 @@ var FieldViewText = FieldView.extend({
e.preventDefault();
this.stopListening(Backbone, 'click', this.fieldValueBlur);
this.endEdit(e.target.value, { tab: { field: this.model.name, prev: e.shiftKey } });
} else if (code === Keys.DOM_VK_G) {
e.preventDefault();
this.showGenerator();
}
},

View File

@ -11,6 +11,7 @@ Release notes
`+` option to preload default config and file
`+` save displayed table columns
`+` confirmation in password change dialog
`+` inline generator keyboard management
`-` fix app redraw in background
`-` fix idle timer on computer sleep