Merge pull request #4976 from aignatov-bio/ai-sci-7922-fix-name-editing

Fix tab button on name edit fields [SCI-7922]
This commit is contained in:
aignatov-bio 2023-02-15 13:49:15 +01:00 committed by GitHub
commit 2f25e7ef7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,15 +180,14 @@ var inlineEditing = (function() {
.removeClass('hidden');
e.stopPropagation();
})
.on('keyup', `${editBlocks} input`, function(e) {
.on('keydown', `${editBlocks} input`, function(e) {
var container = $(this).closest(editBlocks);
if (e.keyCode === 13) {
updateField(container);
} else if (e.keyCode === 9) {
$(`${editBlocks} .cancel-button`).trigger('click');
}
e.stopPropagation();
})
.on('blur', `${editBlocks} input`, function() {
$(`${editBlocks} .cancel-button`).trigger('click');
});
$(window).click((e) => {