Skip to content

fix: clear pre-upgrade observable property shadowing on element upgrade#7647

Draft
AKnassa wants to merge 2 commits into
microsoft:fast-element-2.xfrom
AKnassa:fix/7194-undefined-preupgrade-obs
Draft

fix: clear pre-upgrade observable property shadowing on element upgrade#7647
AKnassa wants to merge 2 commits into
microsoft:fast-element-2.xfrom
AKnassa:fix/7194-undefined-preupgrade-obs

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 12, 2026

Copy link
Copy Markdown

What this does

Fixes observable properties that were set on an element before the custom element finished upgrading, so they stay reactive afterwards — notably in Safari.

Why

If a value was assigned to an element before its class definition was applied, that value sat on the instance as a plain property and shadowed the real observable one. The property then looked set but never notified anything of changes.

What changed

  • The shadowing pre-upgrade property is now cleared during upgrade, so the real observable takes over

Note on the base branch

This targets fast-element-2.x, not main. The hydration and element-controller code this fix touches lives only on that line.

How to see it

Run the fast-element Playwright suite on fast-element-2.x. 45 tests cover the element controller.

Closes #7194

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant