1
0
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:
Thomas Tanghus 2012-12-07 15:42:42 +01:00
parent c454769363
commit 13f5ba47fd

View File

@ -490,9 +490,12 @@ GroupList.prototype.editGroup = function(id) {
$(this).next('.checked').addClass('disabled');
}
});
$input.on('keypress', function(event) {
if(event.keyCode === 13) {
$input.on('keyup', function(event) {
var keyCode = Math.max(event.keyCode, event.which);
if(keyCode === 13) {
saveChanges($elem, $(this));
} else if(keyCode === 27) {
$elem.remove();
}
});
$input.next('.checked').on('click keydown', function(event) {