Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.

Commit 86d3d4e

Browse files
divyanshiGuptajoshuawilson
authored andcommitted
fix(markdown): handle click event on preview (#159)
1 parent 742cc95 commit 86d3d4e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/app/markdown/markdown.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</ul>
1111
<div class="editor-container">
1212
<div class="editor" #previewArea
13-
(click)="enableEditor()"
13+
(click)="enableEditor($event);"
1414
[class.active]="editorActive"
1515
[class.show-less]="!showMore && !editorActive">
1616
<div class="editor-icon-container">

src/app/markdown/markdown.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ export class MarkdownComponent implements OnChanges, OnInit, AfterViewChecked {
232232
}
233233
}
234234

235-
enableEditor() {
235+
enableEditor(event: MouseEvent) {
236+
if (event) {
237+
event.stopPropagation();
238+
}
236239
if (this.rawText === '') {
237240
this.activeEditor();
238241
}

0 commit comments

Comments
 (0)