Skip to content

Scroll View URL Hash Not Working #3815

Open

Description

@xveganxxxedgex

Thank you for this library!

We've recently tried implementing the scroll view ability but are noticing an issue with the slide hash logic. Everything works as expected for the default horizontal navigation behaviour, but on scroll view it seems like any slides past the halfway point of the total slides seems to get offset by 1 index.

For example, here's with the default horizontal view, refreshing the page when the slide hash is present loads the correct slide as expected:

horizontal.mov

However, with scroll view enabled, when you have a slide more than halfway through the presentation in the hash, it's off by one index and loads the previous slide:

vertical.mov

Here's another example showing it happens on a presentation with less slides as well:

less_slides.mov

This is also an issue when using the slide API method. I tried debugging the reveal.js code and can't seem to find where this is happening - the variables seem like it has the correct slide but the index is getting altered somewhere along the way that I haven't tracked down. I also tried running a sync before calling slide but that also didn't seem to help.

Is there a way to get around this issue to make sure it uses the correct slide when hashes are used with scroll view? Thank you!

Activity

  1. hamed5962 commented on Oct 21, 2025

    @hamed5962
  2. jmuheim commented on Sep 5, 2026

    @jmuheim

    We experienced similar behavior.

    We don't need scroll view, so we disabled it in our project via scrollActivationWidth: 0. Not an answer to your question, and certainly not a real fix - but scroll view (in my opinion) isn't a very useful feature anyway, so for people stopping by because of a web search, this might be a useful hint.

  3. EvanCarroll commented on Oct 16, 2026

    @EvanCarroll

    That should fix it and it doesn't change the default.

    The other patches changes the default and doesn't fix it.

    Note: I pesonally think the default should change, but it should still be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions