Is this a regression?
The previous version in which this bug was not present was
@angular/material 20.0.0-rc.0
Description
When form-field is used inside a custom element and afterRenderEffect is triggered (_syncOutlineLabelOffset() in https://github.com/angular/components/blob/main/src/material/form-field/form-field.ts), the below unhandled exception is thrown.
TypeError: fn is not a function
at AfterRenderEffectSequence.destroy (core.mjs:4238:17)
at debug_node-Nc-zr65s.mjs:16753:69
at processCleanups (debug_node-Nc-zr65s.mjs:8113:13)
at cleanUpView (debug_node-Nc-zr65s.mjs:8048:9)
at destroyViewTree (debug_node-Nc-zr65s.mjs:7984:21)
at destroyLView (debug_node-Nc-zr65s.mjs:8021:5)
The passing of signels from one phase to the next fails when running inside a custom element. This is a more generic problem than this bug report, but the only place this functionality is used in angular (core and material) as far as I could search on github is here.
It was introduced in this commit: angular/components#31086: perf(material/form-field): split DOM accesses into read and write
Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
Expected Behavior
It works as in 20.0.0-rc.0
Actual Behavior
An exception is thrown:
TypeError: fn is not a function
at AfterRenderEffectSequence.destroy (core.mjs:4238:17)
at debug_node-Nc-zr65s.mjs:16753:69
at processCleanups (debug_node-Nc-zr65s.mjs:8113:13)
at cleanUpView (debug_node-Nc-zr65s.mjs:8048:9)
at destroyViewTree (debug_node-Nc-zr65s.mjs:7984:21)
at destroyLView (debug_node-Nc-zr65s.mjs:8021:5)

Environment
- Angular: v20 rc-2
- Angular CLI: v20 rc-3
- CDK/Material: v20 rc-2
- Browser(s): All
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
Is this a regression?
The previous version in which this bug was not present was
@angular/material 20.0.0-rc.0
Description
When form-field is used inside a custom element and afterRenderEffect is triggered (_syncOutlineLabelOffset() in https://github.com/angular/components/blob/main/src/material/form-field/form-field.ts), the below unhandled exception is thrown.
The passing of signels from one phase to the next fails when running inside a custom element. This is a more generic problem than this bug report, but the only place this functionality is used in angular (core and material) as far as I could search on github is here.
It was introduced in this commit: angular/components#31086: perf(material/form-field): split DOM accesses into read and write
Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
Expected Behavior
It works as in 20.0.0-rc.0
Actual Behavior
An exception is thrown:
Environment