fix(slides): disable scroll view on mobile to prevent crash#10212
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Disables reveal.js’s mobile “scroll view” mode for the slides deck to avoid a crash caused by reveal.js rewriting the slide DOM that @revealjs/react manages.
Changes:
- Set
scrollActivationWidth: 0in the reveal.js config to prevent auto-switching to scroll view on mobile. - Document why scroll view is disabled (DOM ownership conflict leading to
reveal.sync()crashes).
Light2Dark
marked this pull request as ready for review
July 17, 2026 14:00
mscolnick
approved these changes
Jul 17, 2026
Contributor
|
I wonder if this will fix #10159 |
Contributor
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.15-dev27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Serving a slides notebook on mobile (e.g. a WASM export opened on a phone) crashes with an error boundary:
Root cause
reveal.js automatically switches to its scroll view when the presentation width drops below
scrollActivationWidth(default435px, i.e. most phones). Scroll view rewrites the slide DOM — it wraps every<section>in.scroll-pagenodes and removes the.stackwrappers.But marimo renders the deck via
@revealjs/react, which owns those same nodes and re-runsreveal.sync()whenever the slide structure changes (documented behavior: slides added/removed/reordered/regrouped). During a WASM notebook load, cell outputs stream in and repeatedly change the composition, sosync()fires while scroll view has relocated/removed the nodes. reveal then re-runssyncPages()with zero.scroll-pageelements, leavingslideTriggersempty, andsetTriggerRanges()dereferencesslideTriggers[-1].range→ crash.This is a structural incompatibility, not a tuning issue: the official React wrapper has an open bug where
view: 'scroll'collapses the deck into a single slide, and scroll view also breaksdeck.slide()/hash navigation which marimo relies on for active-cell sync.Fix
Set
scrollActivationWidth: 0in the deck config to disable reveal's responsive scroll view. Mobile now keeps the same paginated deck as desktop; reveal's touch navigation (swipe) is on by default, so phone users still navigate naturally.0is used rather thannullbecause the installedRevealConfigtypes the option asnumber.📋 Pre-Review Checklist
✅ Merge Checklist