Prevent UI errors
The following errors(without noticeable effects) occur while using the app:
-
TypeError when navigating between features (room overview, live feedback, settings, login, etc.): Uncaught TypeError: Cannot read properties of null (reading 'focus')
. This is always caused by adocument.getElementById(<elementId>).focus()
which is called after a timeout. In most cases usingngAfterViewInit
here insteadsetTimeout
should fix this. If an element has been added dynamically and needs to be focused and using a timeout is necessary, the timeout should be canceled if component has been destroyed. -
Error when navigating quickly between contents in the stepper or direct entry with a step > 1: Uncaught Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'left'. Current value: 'init'. Expression location: StepperComponent component.
See https://angular.io/errors/NG0100. -
TypeError when updating room in settings and then navigate to other room route: Cannot read properties of undefined (reading 'data')
. Seems like router snapshot data is undefined then atnav-bar.component.ts:194:42
. -
Errors when quickily navigating between content statistics: TypeError: Cannot read properties of null (reading 'id') at new Chart
(all content types) andTypeError: Cannot read properties of null (reading 'addEventListener') at addListener
for prioritization contents.
Edited by Lukas Weingarten