Skip to content

fix(vue): update output target and properly emit events#30227

Merged
brandyscarney merged 7 commits into
mainfrom
cb/vue-update-0-9-5
Mar 11, 2025
Merged

fix(vue): update output target and properly emit events#30227
brandyscarney merged 7 commits into
mainfrom
cb/vue-update-0-9-5

Conversation

@christian-bromann
Copy link
Copy Markdown
Contributor

@christian-bromann christian-bromann commented Mar 3, 2025

Issue number: resolves #30206 resolves #30178 resolves #30177 resolves #30175 resolves #30170


What is the current behavior?

There have been plenty of issues reported in regards to Vue components failing to propagate events. It seems like when we updated the Vue output target and started to use the provided runtime code from the output target, we have changed the way how event names are computed. Ionic has used a custom wrapper for handling events that would kebab case event names. That is no longer needed and removing it fixes observed issues.

Reproduction case working: https://stackblitz.com/edit/vj18czas-wdhzxjom?file=package.json

What is the new behavior?

We have received a fix for this in stenciljs/output-targets#617 which I hope will resolve this issue by updating the dependency.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 8.4.4-dev.11741193800.14916f6f

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 4:45pm

@github-actions github-actions Bot added the package: core @ionic/core package label Mar 3, 2025
@christian-bromann christian-bromann marked this pull request as draft March 3, 2025 19:49
@christian-bromann
Copy link
Copy Markdown
Contributor Author

Verified fix for reproduction case referenced in: #30170
https://stackblitz.com/edit/vj18czas-ixc2u6au?file=package.json

@christian-bromann
Copy link
Copy Markdown
Contributor Author

This does not resolve #30179

@christian-bromann
Copy link
Copy Markdown
Contributor Author

Verified fix for reproduction case referenced in: #30206
https://stackblitz.com/~/github.com/ozgurg/ionic-8.4.3-event-issue-reproduce

@brandyscarney brandyscarney changed the title chore(core): update Vue output target fix(vue): update output target and properly emit events Mar 5, 2025
@brandyscarney
Copy link
Copy Markdown
Member

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.

I've also tested and verified what Brandy found on 8.4.4-dev.11741193800.14916f6f. Good work! 🚀

@andrei0x309
Copy link
Copy Markdown

Can confirm this issue in 8.4.3 with @ionInput on ion-searchbar component, downgrading to 8.4.2 until 8.4.4 is released that fixes this issue.

@robkorv
Copy link
Copy Markdown

robkorv commented Mar 12, 2025

Thanks for the fix!

pull Bot pushed a commit to Zezo-Ai/ionic-framework that referenced this pull request May 20, 2026
…onic-team#31159)

Issue number: resolves ionic-team#27843

---------

## What is the current behavior?

`createInlineOverlayComponent` renders inline overlays (modal, popover,
etc.) inside a `<template>` at their declared JSX position. When the
overlay presents, `CoreDelegate` teleports the DOM node into `ion-app`,
but React's synthetic event delegation root stays at the original JSX
parent. Once the overlay lives outside that subtree, React no longer
dispatches events to children inside it, so `onClick`, `onChange`, and
other handlers inside an `IonModal` rendered within an `IonNav` silently
stop firing

## What is the new behavior?

Top-level inline overlays now render through `createPortal` into the
same `ion-app` container that `CoreDelegate` teleports into, so React's
event root follows the DOM

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

This issue also reports the same problem in Vue, but that was fixed in
ionic-team#30227

Preview:
[navigation-modal](https://ionic-framework-git-fw-6314-ionic1.vercel.app/react/navigation-modal)

Dev build:
```
8.8.8-dev.11779302602.17decfbf
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package package: vue @ionic/vue package

Projects

None yet

5 participants