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.

4 Likes

@NateDhaliwal many thanks!!

It helped yes! There’s just one detail that maybe you know how to fix.

The back button disappears when you scroll down (please see attached video)…is it possible to have the back button fixed/floating at the top of the screen so that it remains visible even when scrolling?

Hi there. As I don’t control this component, you will have to make this request in the component’s topic itself. Thanks!

1 Like

Sorry I don’t know android apps well, but is this not a back button?

A smartphone screen displays a conversation with a chatbot, emphasizing the "Bookmark" feature.  (Captioned by AI)

I think they were referring to the component’s back button.

1 Like

This button is going to be clunky and unnecessary.

Ultimately there is something wrong with the app that’s preventing swipe back which is native to Discourse and should be supported by the app.

I have deployed several apps to the app store and play store (none of which had this issue)

If you have budget I can take a look at the root cause for you.

1 Like

Yes, it is. But when users click on that button the app closes (goes to background) instead of navigating back.

@cristo could you please give this existing TC a try and let me know your thoughts…

1 Like

I just tried on iphone 15 pro max - the back and forward buttons don’t show up in safari, and they show up in chrome but don’t work :cry:

1 Like

I tried it on our mobile app (embedded webview) and it didn’t work.

The back and forward buttons do appear but nothing happens when I click on them.

Thanks for checking that and please do post any additional design ideas or examples you find.

1 Like