Skip to content

fix(compiler-vapor): keep end tags at foreign scope boundaries - #15657

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-foreign-scope-end-tags
Sep 28, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-foreign-scope-end-tags

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

In a Vapor template, an html element inside <foreignObject> loses its end tag when the template is abbreviated. </foreignObject> doesn't close it in the browser parser, so every svg sibling after it is parsed into that <div> and never renders. That's the usual shape of a Figma gradient export, e.g. writer-framework. Html end tags don't reach past MathML text elements either: a <p> after a formula ends up inside its <mn>. Playground

canOmitEndTag now keeps the end tag of a child in a different namespace than its foreign parent (not only html children: Chrome also misparses <math> in <foreignObject>), and foreignObject, desc and the MathML text elements join table/button as scope boundaries. The cost is a few extra end tags in foreign content off the rightmost path.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7a29d014-814c-4da2-a35b-12d5f5d33e7e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15657
npm i https://pkg.pr.new/@vue/compiler-core@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15657
npm i https://pkg.pr.new/@vue/compiler-dom@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15657
npm i https://pkg.pr.new/@vue/compiler-sfc@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15657
npm i https://pkg.pr.new/@vue/compiler-ssr@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15657
npm i https://pkg.pr.new/@vue/compiler-vapor@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15657
npm i https://pkg.pr.new/@vue/reactivity@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15657
npm i https://pkg.pr.new/@vue/runtime-core@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15657
npm i https://pkg.pr.new/@vue/runtime-dom@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15657
npm i https://pkg.pr.new/@vue/runtime-vapor@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15657
npm i https://pkg.pr.new/@vue/server-renderer@15657
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15657
npm i https://pkg.pr.new/@vue/shared@15657
yarn add https://pkg.pr.new/@vue/[email protected]

vue

pnpm add https://pkg.pr.new/vue@15657
npm i https://pkg.pr.new/vue@15657
yarn add https://pkg.pr.new/[email protected]

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15657
npm i https://pkg.pr.new/@vue/compat@15657
yarn add https://pkg.pr.new/@vue/[email protected]

commit: 8cb7e84

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.2 kB 30.6 kB 26.9 kB
runtime-dom.global.prod.js 116 kB (+43 B) 43.9 kB (+14 B) 39.2 kB (-5 B)
vue.global.prod.js 176 kB (+43 B) 64 kB (+21 B) 57 kB (+13 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.1 kB (+43 B) 20.7 kB (+17 B) 18.9 kB (+16 B)
createApp 61.9 kB (+43 B) 23.9 kB (+15 B) 21.7 kB (+5 B)
createApp + vaporInteropPlugin 125 kB (+871 B) 45.1 kB (+295 B) 40.6 kB (+259 B)
createVaporApp 31.3 kB (+375 B) 12 kB (+141 B) 11 kB (+126 B)
createSSRApp 66.9 kB (+43 B) 25.9 kB (+15 B) 23.6 kB (+42 B)
createVaporSSRApp 37.9 kB (+304 B) 14.4 kB (+107 B) 13.2 kB (+88 B)
defineCustomElement 68.4 kB (+43 B) 25.9 kB (+17 B) 23.5 kB (+20 B)
defineVaporCustomElement 46.7 kB (+375 B) 17 kB (+134 B) 15.6 kB (+120 B)
overall 77.4 kB (+43 B) 29.4 kB (+16 B) 26.7 kB (+24 B)

@ValentinYoushkevich
ValentinYoushkevich force-pushed the fix/vapor-foreign-scope-end-tags branch from 53d8565 to 8cb7e84 Compare September 28, 2026 05:55
@edison1105
edison1105 merged commit 13d0e4d into vuejs:minor Sep 28, 2026
15 checks passed
zhiyuanzmj added a commit to vuejs/vue-jsx-vapor that referenced this pull request Oct 2, 2026
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.

2 participants