Text task: flush annotation updates on unmount (#4752)
Text task: flush annotation updates on unmount (#4752)

* Flush any pending updates on unmount
Make sure we sync the annotation to the latest version of the text input value before unmounting. This should avoid bugs where updateAnnotation is called after the text input has been removed from the DOM.

* Explicitly pass a value to updateAnnotation
Always call updateAnnotation with the new annotation value, instead of getting it from the DOM.

* Remove redundant function binding
Instance methods are bound to an instance of the class by default. Binding _.debounce() strips off the cancel and flush methods that lodash adds to the returned function.

* Flush annotation updates on blur too

* Appease the linter
Add a default value for props.autoFocus.
Fix a React key warning for the tagging buttons.

amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,zooniverse/Panoptes-Front-End,amyrebecca/Panoptes-Front-End