From 1f88d557b147f2920fc24d03c963f1c4ae1209e4 Mon Sep 17 00:00:00 2001 From: Sumedha Pramod Date: Wed, 15 Nov 2017 10:37:35 -0800 Subject: [PATCH] Fix: Don't clear reply textarea when annotation is added to dialog (#36) --- src/AnnotationDialog.js | 2 +- src/__tests__/AnnotationDialog-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AnnotationDialog.js b/src/AnnotationDialog.js index bd6d504d4..263d0b474 100644 --- a/src/AnnotationDialog.js +++ b/src/AnnotationDialog.js @@ -225,7 +225,7 @@ class AnnotationDialog extends EventEmitter { } this.addAnnotationElement(annotation); - this.deactivateReply(true); // Deactivate reply area and focus + this.deactivateReply(); // Deactivate reply area and focus } /** diff --git a/src/__tests__/AnnotationDialog-test.js b/src/__tests__/AnnotationDialog-test.js index 101a37df7..e36f8a20c 100644 --- a/src/__tests__/AnnotationDialog-test.js +++ b/src/__tests__/AnnotationDialog-test.js @@ -247,7 +247,7 @@ describe('AnnotationDialog', () => { it('should add annotation to the dialog and deactivate the reply area', () => { dialog.addAnnotation(new Annotation({})); expect(stubs.addEl).to.be.called; - expect(stubs.deactivate).to.be.calledWith(true); + expect(stubs.deactivate).to.be.calledWithExactly(); }); it('should hide the create section and show the show section if there are no annotations', () => {