Skip to content

fix(runtime-dom): treat disablepictureinpicture and disableremoteplayback as boolean attributes - #15952

Merged
edison1105 merged 1 commit into
vuejs:mainfrom
ValentinYoushkevich:fix/media-boolean-attrs
Oct 20, 2026
Merged

edison1105 merged 1 commit into
vuejs:mainfrom
ValentinYoushkevich:fix/media-boolean-attrs

Conversation

@ValentinYoushkevich

@ValentinYoushkevich ValentinYoushkevich commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

<video :disablepictureinpicture="false"> renders disablepictureinpicture="false", and the same happens for disableremoteplayback. Both are boolean content attributes, so the browser reads the attribute as present and keeps Picture-in-Picture or remote playback disabled. For example, this player binds :disablepictureinpicture="!enablePip", and with that binding PiP can't be turned back on. In SSR output the attribute is also rendered as ="false".

This is the same root cause as #15627 (playsinline). The DOM properties are camelCased (disablePictureInPicture, disableRemotePlayback), so the lowercase key fails the key in el check and goes through patchAttr. These two attributes are added to specialBooleanAttrs, which covers both the client and the SSR isBooleanAttr path.

Playground (3.5.44): link

Summary by CodeRabbit

  • Bug Fixes

    • Added support for the disablepictureinpicture and disableremoteplayback attributes on video elements.
    • Boolean values now correctly add or remove these attributes during client-side updates.
    • Server-rendered video elements now correctly include the attributes when enabled and omit them when disabled.
  • Tests

    • Added coverage for client-side attribute updates and server-side rendering behavior.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 997e81bc-39f1-461b-b515-d27ad5f4a586
📥 Commits

Reviewing files that changed from the base of the PR and between 08f5abf and e7c73cf.

📒 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: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The shared DOM attribute configuration now treats disablepictureinpicture and disableremoteplayback as special boolean attributes. Runtime DOM and SSR tests cover rendering when each attribute is true or false.

Changes: Media Boolean Attribute Support

Layer / File(s) Summary
Register and test media attributes
packages/shared/src/domAttrConfig.ts, packages/runtime-dom/__tests__/patchAttrs.spec.ts, packages/server-renderer/__tests__/ssrRenderAttrs.spec.ts
The shared configuration registers both attributes as special boolean attributes. Tests verify that true sets or renders an empty attribute and false removes or omits it.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: gjija, edison1105

Merge Risk: ⚪ Minimal · up to e7c73

No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 5
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 the two media attributes as boolean attributes 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.
Full details: Docstring Coverage

Explanation

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 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: e7c73cf

@github-actions

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 111 kB (+46 B) 41.9 kB (+22 B) 37.6 kB (-59 B)
vue.global.prod.js 171 kB (+46 B) 62.3 kB (+21 B) 55.3 kB (-43 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 52 kB (+46 B) 20 kB (+25 B) 18.4 kB (+15 B)
createApp 60.2 kB (+46 B) 23.2 kB (+24 B) 21.1 kB (+32 B)
createSSRApp 64.9 kB (+46 B) 25.1 kB (+23 B) 22.9 kB (+18 B)
defineCustomElement 66.5 kB (+46 B) 25.1 kB (+25 B) 22.8 kB (-8 B)
overall 74.6 kB (+46 B) 28.4 kB (+23 B) 25.8 kB (+18 B)

@edison1105 edison1105 added 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. ready to merge The PR is ready to be merged. labels Oct 20, 2026
@edison1105
edison1105 merged commit ef81ddc into vuejs:main Oct 20, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. 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