Repository navigation
fix(runtime-dom): treat playsinline as a boolean attribute - #15627
Conversation
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.
|
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 configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe shared DOM attribute configuration now recognizes Changesplaysinline boolean attribute
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to 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)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
<video :playsinline="false">rendersplaysinline="false", both on the client and in SSR output.playsinlineis 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 thekey in elcheck and goes throughpatchAttr, but unlikereadonlyit isn't inspecialBooleanAttrs, sofalsegets written as a string. Adding it to that list fixes both paths (the SSRisBooleanAttrlist is built from it), and it now behaves likereadonly. Added a test inpatchAttrs.spec.tsand one inssrRenderAttrs.spec.ts.Playground: https://play.vuejs.org/#eNptUk1PhDAQ/SuTxsiaIBzUC1YSDyaa6M1jE0UYXGJ32kDB3RD+u9N2vw7eeI83b2bedBaP1mbTiKIQcqj7zjoY0I22VNRtrOkdzNBjm8Jv5ep1CobezEgOG1ig7c0GEi5OFCmqDQ0OOtIdITz4olVb6QGvDr+mPXskzOj2VJIwqagdqXadIeaqZnUFsyLwqmyq9OhNPxlg//z+9lrAxTxFPjuSi1I0dQ2azOpqN7yEWc6VZ/TyqWhRdNxn5XvyFGHPVVwjDYOkHEGrx2FdQGLN4BJYWCfzGBcHxcDhhr0dMgKQuvpCXcqOLG/odhYflKjXWP98ma0SMF1vTIOaydiGqbw8JTfPh+9lkXn0CrZhNSjCElFxbsE5MpyUKGUelLHI9liyo8/a23kY+fJpa7H2l/zt3PrUPhytAFnzjOWldvfB7PLb3XsQrT2SeVBARc1e/E/0wWyv5ObcWuZnWYlUfEzYD3xzfoA32V12eyOWP4I05oU=
Summary by CodeRabbit
playsinlineattribute on video elements is now handled consistently: enabled values render as an empty attribute, while disabled values omit it.