react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

[Bug]: YouTube video embeds cause horizontal scrolling/overflow on mobile

Open oceansync opened this issue 6 months ago • 0 comments

Summary

When viewing pages with embedded YouTube videos on a mobile device, the page allows horizontal scrolling because of the fixed height and width properties of the embedded videos. This causes users to accidentally swipe left and right, going offscreen.

Steps to reproduce

  1. Open a page with a YouTube video embed (like /versions) on a mobile device (or via Chrome DevTools mobile emulation).
  2. Attempt to swipe horizontally.
  3. Observe that the entire page shifts left and right because the video container is wider than the screen.

Expected behavior

The website layout should remain locked vertically. The YouTube video should scale down proportionally to fit the width of the mobile screen.

Environment

  • Device: Mobile (iOS/Android)
  • Browser: Safari, Chrome, Firefox

Page

https://react.dev/versions#initial-commit

Details

Broken Viewport:

Image

oceansync avatar May 26 '26 17:05 oceansync