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
fix vertical stack background not working in scroll view #3568
Conversation
update repo
Thanks! This has been merged with a few minor naming tweaks. |
Hi @hakimel, Your changes makes sense and target the particular issue more precisely with the new isVertical argument. However, I now have a theme background copy issue on singular slides! So the copying of the theme background happens for the stacks but not for a stack of 1? I see that a background element is created for the single slide but its background style is empty as far as I can tell. It could be something else going on, but when I revert back to my fork, the issue is gone. I will look into it more a bit now and later when I am able. |
Ok, I think I figured it out. By copying the presentation background and not the So right now, I am leaning on this being a persisting bug. Meaning that it is an issue that still needs fixing. I thought the problem was specific to my case where I am lazy loading my theme, but then I didnt understand why the code in my fork worked. If so, this might be causing other issues... Let me know what you think @hakimel . I still think my code needs adjustment in the direction you provided to be more intentional and clear about targeting the case where a slide is part of a vertical stack and the case where the slide is not. |
Setting
data-background-color
on the parent<section>
of a vertical stack works in normal slide view but not in the new scroll view (view: "scroll"
).In the following example,
the first two slides which are in the same vertical stack should have the same red background. In the normal view they do, but in scroll view they do not.
Looking in
scrollview.js
, I could not find any code that aims to transfer the effect of the<div class="backgrounds">
element which is responsible for establishing the background for stacks and slides so I added logic that checks if the "backgrounds" element exists and then copies the backgrounds of the immediate children to the corresponding scroll view page elements (in place of copying the presentation viewport background).This seems to have resolved this issue for me.