Skip to content

Prevent UI errors

Lukas Weingarten requested to merge 1156-prevent-ui-errors into master

1. Fix and smiplify focusing elements for a11y

IInstead of focusing every element manually in components lifecycle hooks, use new directive `AutofocusDirective` instead. The directive can be used with selector [appAutofocus]. If an element should be focused on condition [appAutofocus]="<<condition>>" can additionally set dynamically.

2. Wait for animation state assignment before changing it again

This prevents ExpressionChangedAfterItHasBeenCheckedErrors which currently occur when switching quickly between contents in stepper.

3. Check if canvas element exists before chart creation

Currently this leads UI errors if an element doesn't exist (anymore).

4. Use route snapshot data in NavBarComponent instead of subscribing to route data

Since subscribing to route data is not needed and incorrectly leads to another initialization of the nav bar items.

Closes #1156 (closed)

Edited by Lukas Weingarten

Merge request reports