Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Client: fix form upload validation on key enter

Chocobozzz464853031832
diff --git a/client/src/app/videos/video-add/video-add.component.html b/client/src/app/videos/video-add/video-add.component.html
index 64320cae7d..14c7a01365 100644
--- a/client/src/app/videos/video-add/video-add.component.html
+++ b/client/src/app/videos/video-add/video-add.component.html
@@ -2,7 +2,7 @@
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
-<form novalidate (ngSubmit)="upload()" [formGroup]="form">
+<form novalidate [formGroup]="form">
<div class="form-group">
<label for="name">Name</label>
<input
@@ -68,8 +68,9 @@
<div class="form-group">
<input
- type="submit" value="Upload" class="btn btn-default form-control" [title]="getInvalidFieldsTitle()"
- [disabled]="!form.valid || tags.length === 0 || filename === null"
+ type="button" value="Upload" class="btn btn-default form-control"
+ [title]="getInvalidFieldsTitle()" [disabled]="!form.valid || tags.length === 0 || filename === null"
+ (click)="upload()"
>
</div>
</form>
diff --git a/client/src/app/videos/video-add/video-add.component.ts b/client/src/app/videos/video-add/video-add.component.ts
index 0a8b8293b9..b7bf1534f9 100644
--- a/client/src/app/videos/video-add/video-add.component.ts
+++ b/client/src/app/videos/video-add/video-add.component.ts
@@ -130,6 +130,7 @@ export class VideoAddComponent extends FormReactive implements OnInit {
removeTag(tag: string) {
this.tags.splice(this.tags.indexOf(tag), 1);
+ this.form.get('currentTag').enable();
}
upload() {