Fix video-ccomment-add cancellation

pull/2567/head
Rigel Kent 2020-03-15 16:05:37 +01:00
parent e61151b01c
commit 79671021e2
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
3 changed files with 12 additions and 9 deletions

View File

@ -17,7 +17,7 @@
</div>
<div class="comment-buttons">
<button *ngIf="isAddButtonDisplayed()" class="cancel-button" (click)="cancelCommentReply()" i18n>
<button *ngIf="isAddButtonDisplayed()" class="cancel-button" (click)="cancelCommentReply()" type="button" i18n>
Cancel
</button>
<button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid || addingComment }" i18n>

View File

@ -30,14 +30,6 @@ form {
}
}
.cancel-button {
font-weight: $font-semibold;
display: inline-block;
padding: 0 10px 0 10px;
white-space: nowrap;
background: transparent;
}
.comment-buttons {
display: flex;
justify-content: flex-end;
@ -49,6 +41,16 @@ form {
@include orange-button;
}
}
.cancel-button {
@include tertiary-button;
font-weight: $font-semibold;
display: inline-block;
padding: 0 10px 0 10px;
white-space: nowrap;
background: transparent;
}
}
@media screen and (max-width: 600px) {

View File

@ -139,6 +139,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
cancelCommentReply () {
this.cancel.emit(null)
this.form.value['text'] = this.textareaElement.nativeElement.value = ''
}
private addCommentReply (commentCreate: VideoCommentCreate) {