Skip to content

fix(label): render content set with innerHTML - #31739

Merged
brandyscarney merged 1 commit into
FW-7890-stencilfrom
FW-7890-fix-label-innerhtml
Nov 12, 2026
Merged

brandyscarney merged 1 commit into
FW-7890-stencilfrom
FW-7890-fix-label-innerhtml

Conversation

@brandyscarney

Copy link
Copy Markdown
Member

Issue number: internal


What is the current behavior?

Binding innerHTML (for example Angular's [innerHTML]) or setting innerText on an ion-label hides the label after its next render.

What is the new behavior?

  • Content set with innerHTML or innerText renders and stays visible across re-renders.
  • Adds regression tests to label/test/basic.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Stacked on #31738, which updates @stencil/core to 4.45.3 and resolves #31433. Without that update these tests fail.

@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-framework Ready Ready Preview Nov 12, 2026 6:53pm UTC

Request Review

@github-actions github-actions Bot added the package: core @ionic/core package label Nov 11, 2026
@brandyscarney
brandyscarney marked this pull request as ready for review November 11, 2026 22:27
@brandyscarney
brandyscarney requested a review from a team as a code owner November 11, 2026 22:27
@brandyscarney
brandyscarney requested a review from ShaneK November 11, 2026 22:27

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this test! LGTM 🚀

@brandyscarney
brandyscarney added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Nov 12, 2026
@brandyscarney
brandyscarney added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Nov 12, 2026
@brandyscarney
brandyscarney added this pull request to the merge queue Nov 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Nov 12, 2026
Add regression tests for content set with innerHTML and innerText on
ion-label. The fix comes from the @stencil/core 4.45.3 update.
@brandyscarney
brandyscarney force-pushed the FW-7890-fix-label-innerhtml branch from d5cadc3 to 809f467 Compare November 12, 2026 18:48
@brandyscarney
brandyscarney enabled stacked auto-merge November 12, 2026 18:49
@brandyscarney
brandyscarney added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 67cbaeb Nov 12, 2026
56 checks passed
@brandyscarney
brandyscarney deleted the FW-7890-fix-label-innerhtml branch November 12, 2026 19:16
ShaneK pushed a commit to masimplo/ionic-framework that referenced this pull request Nov 12, 2026
Issue number: resolves ionic-team#31433

---------

## What is the current behavior?
Ionic uses `@stencil/core` 4.45.2. On scoped components, setting
`innerHTML` or `innerText` removes a marker node Stencil uses to track
slotted content, so the content is hidden on the next render.

## What is the new behavior?
- Updates `@stencil/core` to 4.45.3, which patches the `innerHTML` and
`innerText` setters on scoped components (stenciljs/core#6997).

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
Regression tests for `ion-label` are added in
ionic-team#31739, which is
stacked on this PR.

Co-authored-by: Brandy Smith <[email protected]>

This branch was successfully deployed

1 active deployment
Preview — 809f467a Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: ion-label does not render when binding innerHTML directly

2 participants