Skip to content

fix(runtime-dom): treat playsinline as a boolean attribute - #15627

Merged
edison1105 merged 1 commit into
vuejs:mainfrom
gjija:fix/playsinline-boolean-attr
Oct 12, 2026
Merged

edison1105 merged 1 commit into
vuejs:mainfrom
gjija:fix/playsinline-boolean-attr

Conversation

@gjija

@gjija gjija commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

<video :playsinline="false"> renders playsinline="false", both on the client and in SSR output. playsinline is a boolean attribute in the HTML spec, so its presence means true whatever the value, and the video still plays inline on iOS.

Its DOM property is playsInline, so the lowercase key fails the key in el check and goes through patchAttr, but unlike readonly it isn't in specialBooleanAttrs, so false gets written as a string. Adding it to that list fixes both paths (the SSR isBooleanAttr list is built from it), and it now behaves like readonly. Added a test in patchAttrs.spec.ts and one in ssrRenderAttrs.spec.ts.

Playground: https://play.vuejs.org/#eNptUk1PhDAQ/SuTxsiaIBzUC1YSDyaa6M1jE0UYXGJ32kDB3RD+u9N2vw7eeI83b2bedBaP1mbTiKIQcqj7zjoY0I22VNRtrOkdzNBjm8Jv5ep1CobezEgOG1ig7c0GEi5OFCmqDQ0OOtIdITz4olVb6QGvDr+mPXskzOj2VJIwqagdqXadIeaqZnUFsyLwqmyq9OhNPxlg//z+9lrAxTxFPjuSi1I0dQ2azOpqN7yEWc6VZ/TyqWhRdNxn5XvyFGHPVVwjDYOkHEGrx2FdQGLN4BJYWCfzGBcHxcDhhr0dMgKQuvpCXcqOLG/odhYflKjXWP98ma0SMF1vTIOaydiGqbw8JTfPh+9lkXn0CrZhNSjCElFxbsE5MpyUKGUelLHI9liyo8/a23kY+fJpa7H2l/zt3PrUPhytAFnzjOWldvfB7PLb3XsQrT2SeVBARc1e/E/0wWyv5ObcWuZnWYlUfEzYD3xzfoA32V12eyOWP4I05oU=

Summary by CodeRabbit

  • Bug Fixes
    • The playsinline attribute on video elements is now handled consistently: enabled values render as an empty attribute, while disabled values omit it.

playsinline is a boolean attribute whose DOM property is playsInline, so it
has to be in the special boolean list. Without it, :playsinline="false"
rendered playsinline="false" on the client and in SSR, which still enables
inline playback.
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 5fc36d30-5637-4d58-b650-71e12265f8f8

📥 Commits

Reviewing files that changed from the base of the PR and between 4ab865a and 672f15a.

📒 Files selected for processing (3)
  • packages/runtime-dom/__tests__/patchAttrs.spec.ts
  • packages/server-renderer/__tests__/ssrRenderAttrs.spec.ts
  • packages/shared/src/domAttrConfig.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The shared DOM attribute configuration now recognizes playsinline as a special boolean attribute. Runtime DOM and server-renderer tests cover its handling.

Changes

playsinline boolean attribute

Layer / File(s) Summary
Configure and validate boolean handling
packages/shared/src/domAttrConfig.ts, packages/runtime-dom/__tests__/patchAttrs.spec.ts, packages/server-renderer/__tests__/ssrRenderAttrs.spec.ts
The configuration adds playsinline to the special boolean attributes. Runtime DOM tests cover setting and removing the attribute. SSR tests cover rendering and omission.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: edison1105

Merge Risk: ⚪ Minimal · up to 672f1

The change treats playsinline as a boolean attribute in client and server rendering, with tests for both enabled and disabled values. No merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: treating playsinline as a boolean attribute in runtime-dom.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

@edison1105 edison1105 added the ready to merge The PR is ready to be merged. label Sep 25, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 672f15a

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 109 kB (+12 B) 41.3 kB (+8 B) 37 kB (-10 B)
vue.global.prod.js 168 kB (+12 B) 61.5 kB (+6 B) 54.6 kB (+25 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 50.8 kB (+12 B) 19.6 kB (+7 B) 18 kB (-17 B)
createApp 59 kB (+12 B) 22.7 kB (+12 B) 20.7 kB (-34 B)
createSSRApp 63.7 kB (+12 B) 24.7 kB (+10 B) 22.5 kB (+20 B)
defineCustomElement 65.2 kB (+12 B) 24.6 kB (+10 B) 22.5 kB (+7 B)
overall 73.5 kB (+12 B) 28 kB (+7 B) 25.5 kB (+44 B)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge The PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants