Skip to content

fix(radio-group): prevent DOMException and NotFoundError when filtering radios#30958

Merged
OS-jacobbell merged 3 commits intomainfrom
FW-6756
Feb 19, 2026
Merged

fix(radio-group): prevent DOMException and NotFoundError when filtering radios#30958
OS-jacobbell merged 3 commits intomainfrom
FW-6756

Conversation

@OS-jacobbell
Copy link
Contributor

@OS-jacobbell OS-jacobbell commented Feb 17, 2026

resolves #30279 resolves #30359

What is the current behavior?

While Ionic's stencil.config.ts sets experimentalSlotFixes: true, the fixes never get applied at runtime. Ionic is using an external runtime, so Ionic components import defineCustomElement from @stencil/core/internal/client at runtime and this code has no awareness of the project's stencil configuration.

This leads to a NotFoundError (Failed to execute 'removeChild' on 'Node') when filtering or dynamically removing radios in an ion-radio-group. The error occurs because ion-radio-group wraps its slotted content in an internal <div>.

What is the new behavior?

By setting externalRuntime: false, Stencil generates a project-specific file with defineCustomElement that components import. This file has the project's build settings baked in, correctly applying slot fixes.

Additionally, the internal wrapper <div> around the slotted content in ion-radio-group is removed. With slot fixes correctly applied and the wrapper removed, radios can be filtered or dynamically removed without triggering NotFoundError or DOMExceptions.

Does this introduce a breaking change?

  • Yes
  • No

Other information

External Runtime is enabled by default and designed for projects that import Stencil components from multiple sources. This is flawed because those components will not be running with the runtime settings for which they were made.

@vercel
Copy link

vercel bot commented Feb 17, 2026

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

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Feb 19, 2026 2:41pm

Request Review

@github-actions github-actions bot added the package: core @ionic/core package label Feb 17, 2026
@OS-jacobbell OS-jacobbell marked this pull request as ready for review February 17, 2026 22:26
@OS-jacobbell OS-jacobbell requested a review from a team as a code owner February 17, 2026 22:26
@OS-jacobbell OS-jacobbell requested a review from gnbm February 17, 2026 22:26
@OS-jacobbell OS-jacobbell changed the title fix(stencil-config): disable external runtime fix(radio-group): prevent DOMException and NotFoundError when filtering radios Feb 18, 2026
Copy link
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.

Looks good to me!

Copy link
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.

Great fix!

@OS-jacobbell OS-jacobbell added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit 682a17e Feb 19, 2026
51 checks passed
@OS-jacobbell OS-jacobbell deleted the FW-6756 branch February 19, 2026 17:15
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

3 participants

Comments