Skip to content

fix(material/form-field): update outlined label offset when direction changes - #33896

Open
MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:fix/form-field-direction-workaround
Open

MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:fix/form-field-direction-workaround

Conversation

@MeAkib

@MeAkib MeAkib commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

In #31643 we added a workaround that copied Directionality.valueSignal into a property through an effect, because reading the signal inside an afterRenderEffect was causing a memory leak (angular/angular#62980). As a side effect, the afterRenderEffect that positions the label of an outlined form field with a prefix no longer depended on the direction, so the label offset wasn't recalculated if the direction changed at runtime.

The framework issue was fixed in angular/angular#63001 so these changes remove the workaround and read the direction directly again.

… changes

In angular#31643 we added a workaround that copied `Directionality.valueSignal` into a property through an `effect`, because reading the signal inside an `afterRenderEffect` was causing a memory leak (angular/angular#62980). As a side effect, the `afterRenderEffect` that positions the label of an outlined form field with a prefix no longer depended on the direction, so the label offset wasn't recalculated if the direction changed at runtime.

The framework issue was fixed in angular/angular#63001 so these changes remove the workaround and read the direction directly again.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant