mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Contacts: Cancel editing new group on escape.
This commit is contained in:
parent
c454769363
commit
13f5ba47fd
@ -490,9 +490,12 @@ GroupList.prototype.editGroup = function(id) {
|
|||||||
$(this).next('.checked').addClass('disabled');
|
$(this).next('.checked').addClass('disabled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$input.on('keypress', function(event) {
|
$input.on('keyup', function(event) {
|
||||||
if(event.keyCode === 13) {
|
var keyCode = Math.max(event.keyCode, event.which);
|
||||||
|
if(keyCode === 13) {
|
||||||
saveChanges($elem, $(this));
|
saveChanges($elem, $(this));
|
||||||
|
} else if(keyCode === 27) {
|
||||||
|
$elem.remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$input.next('.checked').on('click keydown', function(event) {
|
$input.next('.checked').on('click keydown', function(event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user