Skip to content

fix(checkbox): show labels after page navigation#31062

Merged
ShaneK merged 3 commits intomainfrom
FW-7274
Apr 14, 2026
Merged

fix(checkbox): show labels after page navigation#31062
ShaneK merged 3 commits intomainfrom
FW-7274

Conversation

@OS-jacobbell
Copy link
Copy Markdown
Contributor

Issue number: resolves #31052


What is the current behavior?

After a page navigation, ion-checkbox's onslotchange event fires before the element's textContent has been updated. It is called again after textContent becomes readable on Safari, but is not called again after the textContent becomes readable on Chrome and Firefox.

What is the new behavior?

  • Uses MutationObserver instead of onslotchange and fires specifically on character data changes. This ensures hasLabelContent is up to date.
  • MutationObserver does not fire on load, so hasLabelContent is initialized in connectedCallback

Does this introduce a breaking change?

  • Yes
  • No

@OS-jacobbell OS-jacobbell requested a review from a team as a code owner April 2, 2026 20:58
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

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

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Apr 8, 2026 6:19pm

Request Review

@github-actions github-actions bot added the package: core @ionic/core package label Apr 2, 2026
@gnbm gnbm requested a review from ShaneK April 3, 2026 00:21
Copy link
Copy Markdown
Member

@brandyscarney brandyscarney left a comment

Choose a reason for hiding this comment

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

Looks good! Please update the PR title before merging. 🙂

@OS-jacobbell OS-jacobbell changed the title fix(checkbox): use mutation observer instead of onslotchange fix(checkbox): show labels after page navigation Apr 7, 2026
Copy link
Copy Markdown
Member

@ShaneK ShaneK left a comment

Choose a reason for hiding this comment

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

Looking really good! A couple of minor concerns, though

Copy link
Copy Markdown
Member

@ShaneK ShaneK left a comment

Choose a reason for hiding this comment

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

Awesome work! Looks good to me 🚀

@OS-jacobbell OS-jacobbell added this pull request to the merge queue Apr 13, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 13, 2026
@ShaneK ShaneK added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit f4ac445 Apr 14, 2026
51 checks passed
@ShaneK ShaneK deleted the FW-7274 branch April 14, 2026 13:39
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-checkbox doesn't show label from variable after navigating in Angular

3 participants