Autocomplete in an nz-form-control triggers a browser console error

Author: JArdiotJnesisCreated Sep 25, 2026Updated Sep 25, 2026

Reproduction link

https://stackblitz.com/edit/mkapptwv-ulhedacl?file=src%2Fapp%2Fapp.ts

Steps to reproduce

Start typing text into the input. The error seems to occur more frequently when typing quickly.

What is expected?

No error in the browser console

What is actually happening?

An error appears in the console:

ERROR TypeError: Cannot read properties of null (reading 'classList') at FlexibleConnectedPositionStrategy.attach (_overlay-module-chunk.mjs:1040:28) at OverlayRef.attach (_overlay-module-chunk.mjs:684:29) at _NzAutocompleteTriggerDirective.attachOverlay (ng-zorro-antd-auto-complete.mjs:499:29) at _NzAutocompleteTriggerDirective.openPanel (ng-zorro-antd-auto-complete.mjs:367:14) at _NzAutocompleteTriggerDirective.handleInput (ng-zorro-antd-auto-complete.mjs:432:22) at NzAutocompleteTriggerDirective_input_HostBindingHandler (ng-zorro-antd-auto-complete.mjs:595:12)

Environment Info
ng-zorro-antd 22.1.1
Browser Chrome 153 and Firefox 156

I tried declaring the nz-autocomplete component both inside and outside the form-control, but the result is the same. However, the component seems to work as expected despite this error.