# Exception occurs when double-clicking after adding FreeTextAnnotation

**URL:** <https://pdfjs.community/t/exception-occurs-when-double-clicking-after-adding-freetextannotation/277>\
**Category:** Technical Support\
**Created:** [September 20, 2020, 5:42pm UTC](https://pdfjs.community/t/exception-occurs-when-double-clicking-after-adding-freetextannotation/277 "2020-09-20T17:42:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [September 23, 2020, 7:22pm UTC](https://pdfjs.community/t/exception-occurs-when-double-clicking-after-adding-freetextannotation/277/5 "2020-09-23T19:22:36Z")

</div>

Hi!

I still cannot reproduce the double clicking issue. I do notice a few potential issues in your code though.

1. You are creating an annotation named `newAnnot` but then importing an annotation called `textAnnot` into annotation manager (which does not exist)

2. You are not passing a dependency array to `useEffect` which means you may be mounting WebViewer multiple times, which will cause issues.

Also, I’m a bit confused about your last message. Is this a new error that is occurring?

Thanks,  
Logan

---

_[View the full topic](https://pdfjs.community/t/exception-occurs-when-double-clicking-after-adding-freetextannotation/277)._
