diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-15 16:05:37 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2020-03-15 16:05:37 +0100 |
commit | 79671021e2a6164effb0ec4e38ee89ea3c260069 (patch) | |
tree | 6caf05cb6daf2bc4abd07602672fc30a41b83344 | |
parent | e61151b01c80e525db068ff12fcfe2c8ae04e1a4 (diff) | |
download | PeerTube-79671021e2a6164effb0ec4e38ee89ea3c260069.tar.gz PeerTube-79671021e2a6164effb0ec4e38ee89ea3c260069.tar.zst PeerTube-79671021e2a6164effb0ec4e38ee89ea3c260069.zip |
Fix video-ccomment-add cancellation
3 files changed, 12 insertions, 9 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.html b/client/src/app/videos/+video-watch/comment/video-comment-add.component.html index 29c7a8bfa..3e820041d 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.html +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.html | |||
@@ -17,7 +17,7 @@ | |||
17 | </div> | 17 | </div> |
18 | 18 | ||
19 | <div class="comment-buttons"> | 19 | <div class="comment-buttons"> |
20 | <button *ngIf="isAddButtonDisplayed()" class="cancel-button" (click)="cancelCommentReply()" i18n> | 20 | <button *ngIf="isAddButtonDisplayed()" class="cancel-button" (click)="cancelCommentReply()" type="button" i18n> |
21 | Cancel | 21 | Cancel |
22 | </button> | 22 | </button> |
23 | <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid || addingComment }" i18n> | 23 | <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid || addingComment }" i18n> |
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.scss b/client/src/app/videos/+video-watch/comment/video-comment-add.component.scss index c04727ba0..b9e864491 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.scss +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.scss | |||
@@ -30,14 +30,6 @@ form { | |||
30 | } | 30 | } |
31 | } | 31 | } |
32 | 32 | ||
33 | .cancel-button { | ||
34 | font-weight: $font-semibold; | ||
35 | display: inline-block; | ||
36 | padding: 0 10px 0 10px; | ||
37 | white-space: nowrap; | ||
38 | background: transparent; | ||
39 | } | ||
40 | |||
41 | .comment-buttons { | 33 | .comment-buttons { |
42 | display: flex; | 34 | display: flex; |
43 | justify-content: flex-end; | 35 | justify-content: flex-end; |
@@ -49,6 +41,16 @@ form { | |||
49 | @include orange-button; | 41 | @include orange-button; |
50 | } | 42 | } |
51 | } | 43 | } |
44 | |||
45 | .cancel-button { | ||
46 | @include tertiary-button; | ||
47 | |||
48 | font-weight: $font-semibold; | ||
49 | display: inline-block; | ||
50 | padding: 0 10px 0 10px; | ||
51 | white-space: nowrap; | ||
52 | background: transparent; | ||
53 | } | ||
52 | } | 54 | } |
53 | 55 | ||
54 | @media screen and (max-width: 600px) { | 56 | @media screen and (max-width: 600px) { |
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts index a8c432653..5784efcdf 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts | |||
@@ -139,6 +139,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { | |||
139 | 139 | ||
140 | cancelCommentReply () { | 140 | cancelCommentReply () { |
141 | this.cancel.emit(null) | 141 | this.cancel.emit(null) |
142 | this.form.value['text'] = this.textareaElement.nativeElement.value = '' | ||
142 | } | 143 | } |
143 | 144 | ||
144 | private addCommentReply (commentCreate: VideoCommentCreate) { | 145 | private addCommentReply (commentCreate: VideoCommentCreate) { |