hakimel / reveal.js

The HTML Presentation Framework
https://revealjs.com
MIT License
67.66k stars 16.64k forks source link

bug: r-stretch does not work when combined with fragment #3650

Open Xeverous opened 2 months ago

Xeverous commented 2 months ago

Reproduction:

    <section>
        <h2>test</h2>
        <p class="fragment">paragraph</p>
        <img class="fragment r-stretch" src="big_img.png">
        <p class="fragment">second paragraph</p>
    </section>

Effect (Chome Version 126.0.6478.127 (Official Build) (64-bit) on Windows 10):

image

Moving left/right/zoom all result in inconsistent or broken behavior as on this screen. Sometimes the image pushes the text down (outside the screen), sometimes the image doesn't display.

Refreshing the page sometimes fixes the problem but it works only once and moving slides breaks it.

Expected behavior: imagine these elements but without the fragment class. Now I just want each of these (h2, p, img, p) to appear like fragments do.

This code works if you remove the fragment class from all elements. Somehow the hiding logic breaks r-stretch.