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

Commit

Permalink
fix(markdown): handle click event on preview (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshiGupta authored and joshuawilson committed Oct 18, 2018
1 parent 742cc95 commit 86d3d4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/markdown/markdown.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ul>
<div class="editor-container">
<div class="editor" #previewArea
(click)="enableEditor()"
(click)="enableEditor($event);"
[class.active]="editorActive"
[class.show-less]="!showMore && !editorActive">
<div class="editor-icon-container">
Expand Down
5 changes: 4 additions & 1 deletion src/app/markdown/markdown.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ export class MarkdownComponent implements OnChanges, OnInit, AfterViewChecked {
}
}

enableEditor() {
enableEditor(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
if (this.rawText === '') {
this.activeEditor();
}
Expand Down

0 comments on commit 86d3d4e

Please sign in to comment.