Fix video-ccomment-add cancellation
This commit is contained in:
parent
e61151b01c
commit
79671021e2
|
@ -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>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue