Adding a Back Button to Return to Scrolled Position

Hi everyone,

I need help with navigation on my app. Here’s the flow I’m working on:

  1. The user scrolls down the home screen (image attached: “home”), reading the titles of the latest topics.
  2. When they click on a specific topic (image attached: “Bear hugs gone too far”), they are taken to the topic details screen (image attached: “topic screen”), where they can read the full text and replies.
  3. The issue: there’s no “back” button that allows the user to return to the same point in the scroll on the home screen to continue browsing topics.

How can I add a button to return the user to the exact scroll position they were in on the home screen?

Thanks in advance for any suggestions!



Swipe right from left side.

1 Like

Tried that but it doesn’t work. Thanks anyway, @merefield !

Works here on Meta too

1 Like

Call me confused but doesn’t your browser have a back button? I just tested on my iPhone in Safari and Chrome and the back buttons take me right back to where I was in the topic list page. The swiping left and right to go back and forward respectively (like what Robert mentioned above) also works. :thinking: hub app also has back and forward buttons and swiping.

3 Likes

sorry for not giving the full context: my discourse community is embedded in our mobile app…maybe that’s why there’s no back button and the swiping doesn’t work?

2 Likes

So that’s your problem :slight_smile:

Rather unnecessary too (at least on Android) as it has excellent support for PWAs natively (one of the reasons I switched from Apple and their dragging feet)

Discourse is a PWA out of the box :rocket:

Just install the website.

3 Likes

Hi @cristo !
If you really want to have it embedded, maybe this component will help?

Though I’m not sure if it goes back to the scrolled position.

2 Likes