This solves a problem when angular is run in dev mode under the following conditions:
- spinner is in a reactive form;
- spinner's initial value is not null or empty string (some numeric value)
- spinner control's inclusion in template is conditional (within element with *ngIf attribute)
Problem: angular crashes whenever the control is hidden, then displayed.
Reason: angular reports that a value was changed after it was checked.
The timeout proposed eliminates the error with no side effect that I could detect.
Setting preventDocumentDefault = true is what stops the mouse click meant to open the menu from immediately closing it.
However this property is set only when the menu is opened via the toggle method.
When show is called directly, the menu is at the same time opened by the show method, and closed by the event listener on the body.