Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding a <video> in a .slide makes everything blow up in Chrome #68

Open
banksJeremy opened this issue Jun 13, 2012 · 3 comments
Open

Comments

@banksJeremy
Copy link
Collaborator

When I embed a <video> element inside a .slide, Chrome hides everything except for a 10-pixel margin around the side of the page.

Firefox does not have an issue.

@banksJeremy
Copy link
Collaborator Author

@banksJeremy
Copy link
Collaborator Author

Interesting... detaching the video from the DOM and then re-inserting it fixes the issue.

var vid = document.querySelector("video"),
    par = vid.parentNode,
    placeholder = document.createElement("div");
par.replaceChild(placeholder, vid);
setTimeout(function(){ par.replaceChild(vid, placeholder); }, 0);

That's an easy workaround, even if ugly. Be nice to know what's causing it, though...

@banksJeremy
Copy link
Collaborator Author

That only fixes it temporarily. It may break again if the page is resized.

Commenting out resizeTranscript fixes the issue. The issue seems to be caused by setting the value of document.getElementById( "slideshow-transcript" ).style.height, even if the new value is equivalent. (e.g. elem.style.height = +elem.style.height;, the result is converted from a Number to a String with units, but in the end it has the same value.)

banksJeremy pushed a commit to jeremyBanks/slide-drive that referenced this issue Jun 14, 2012
…seif#68)

The previous approach caused Chrome to blow up the page when a <video>
element was added to a slide.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant