mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FIX: Wrap markdown videos with video-container class to stop post height jumping (#8806)
This will lock video aspect ratio to 16:9 and stop them from making posts jump around on load. See also discourse/onebox@6f58545 and fe20cb4.
This commit is contained in:
@ -976,10 +976,12 @@ QUnit.test("images", assert => {
|
||||
QUnit.test("video", assert => {
|
||||
assert.cooked(
|
||||
"",
|
||||
`<p><video width="100%" height="100%" controls>
|
||||
<source src="/404" data-orig-src="upload://eyPnj7UzkU0AkGkx2dx8G4YM1Jx.mp4">
|
||||
<a href="/404">/404</a>
|
||||
</video></p>`,
|
||||
`<p><div class="video-container">
|
||||
<video width="100%" height="100%" controls>
|
||||
<source src="/404" data-orig-src="upload://eyPnj7UzkU0AkGkx2dx8G4YM1Jx.mp4">
|
||||
<a href="/404">/404</a>
|
||||
</video>
|
||||
</div></p>`,
|
||||
"It returns the correct video player HTML"
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user