Commit f4c35074 authored by Jay Swain's avatar Jay Swain

Always autofill group slug

A fellow engineer found an issue in the combined registration page,
where the group slug wouldn't update after a failed validation.

I think typically this wasn't seen, because a slug validator would
increment the slug, but on some occasions if you were faster than
the validator, you could get past it.

This small change always updates the group slug as opposed to only when
the group name is empty.

part of:
https://gitlab.com/gitlab-org/gitlab/-/issues/350221

Changelog: fixed
parent 2a8c0142
......@@ -13,11 +13,8 @@ export default class Group {
this.updateGroupPathSlugHandler = this.updateGroupPathSlug.bind(this);
this.groupNames.forEach((groupName) => {
if (groupName.value === '') {
groupName.addEventListener('keyup', this.updateHandler);
groupName.addEventListener('keyup', this.updateGroupPathSlugHandler);
}
groupName.addEventListener('keyup', this.updateHandler);
groupName.addEventListener('keyup', this.updateGroupPathSlugHandler);
});
this.groupPaths.forEach((groupPath) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment