FormidableLabs / FormidableLabs/spectacle

CodePane sometimes (?) scrolls entire portal up for the rest of the slideshow

Open
#1,029 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10.2k
Forks
700
PR merge metrics
No merged PRs in 30d

Description

### Describe Your Environment

What version of Spectacle are you using? (can be found by running `npm list spectacle`)
8.1

What version of React are you using? (can be found by running `npm list react`)
17.0.2

What browser are you using?
Tested on Firefox & Chrome

What machine are you on?
macOS

### Describe the Problem

If there's enough code in a code slide that it has to slide up, CodeSlide will slide the entire slide window up, and it will stay up for the rest of the presentation. like so (note the black bar that appears at the bottom and top being cut off):

![sadly_scroll_offscreen_forever](https://user-images.githubusercontent.com/12961499/118741736-d30a1c80-b803-11eb-9538-14982ff773c5.gif)

Interestingly, it only happens on versions that are built and deployed -- on the dev and prod versions, if i run it locally the window doesn't scroll, if i run the version that's deployed (via github pages w/ a gh action that shouldn't be any different than me building it fresh locally) then it does.

If i change the `overflow` property of whatever div is just below `id='root'` but above `Deck` (i'm using mdx so it might be the MDXProvider) from `overflow: hidden` to `overflow: visible` or `overflow: clip` it fixes the behavior for some reason.

seems like either the window shouldn't scroll, or the code pane should -- currently i can't use the component because of the problem, and am not really sure why it's happening because i don't understand the inner workings of the portal yet.

**Expected behavior:** [What you expect to happen]

for the *CodePane* to scroll

**Actual behavior:** [What actually happens]

the *Whole Window* scrolls.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.