Skip to content
Snippets Groups Projects
Commit cfba7e20 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

don't hide add group when text is entered (except for ESC press)

parent 853ced64
Branches
No related tags found
No related merge requests found
......@@ -79,6 +79,14 @@
&& $('#newgroup-form').find($(el)).length === 0);
},
hasAddGroupNameText: function() {
name = $('#newgroupname').val();
if($.trim(name) === '') {
return false;
}
return true;
},
showGroup: function (gid) {
UserList.empty();
UserList.update(gid);
......@@ -160,7 +168,8 @@ $(document).ready( function () {
$(document).on('click keydown keyup', function(event) {
if(!GroupList.isAddGroupButtonVisible()
&& !GroupList.elementBelongsToAddGroup(event.target)) {
&& !GroupList.elementBelongsToAddGroup(event.target)
&& !GroupList.hasAddGroupNameText()) {
GroupList.toggleAddGroup();
}
// Escape
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment