Nutrient Web SDK

ReferenceEventsAnnotationsBlurEvent

Interface AnnotationsBlurEvent

This event is emitted whenever an annotation loses focus. Deselecting an annotation with the pointer also blurs it.

When an annotation is deselected by pressing the Escape key, successive annotations.blur and annotations.focus events will be dispatched for the same annotation.

Use this event to add custom behavior like announcing the annotation value to screen readers.

Interface

Example

Log widget annotation new value

instance.addEventListener("annotations.blur", (event) => {
instance.getFormFields().then(formFields => {
const formField = formFields.find(formField => formField.name === event.annotation.formFieldName);
console.log(formField);
});
});

Properties

The annotation that was focused.

Remember that annotations are Immutable.map.

The browser event FocusEvent which caused the annotations.blur event to dispatch. Its type property is set to blur.