Mobile Images - Back Button Functionality

Topic summary

  • Issue: On mobile in the Dawn theme, tapping a product image to zoom opens a lightbox (overlay). Closing works via the X, but pressing the device/browser Back button navigates away to the previous page instead of closing the lightbox, creating a confusing UX.

  • Context/Impact: Because the lightbox isn’t a new page, the Back action pops the browser history and exits the product page. Users instinctively press Back, leading them off the product they were viewing.

  • Request: Enable Back to close the lightbox (i.e., return to the product page state) rather than leaving the product page.

  • Responses/Developments: A Shopify partner offered paid assistance and asked the poster to reach out via Shopify Experts. No technical steps or code were provided in-thread.

  • Status: Unresolved. No confirmed solution or theme setting shared. Key question remains: how to modify the lightbox/back-button behavior on mobile so Back closes the overlay instead of navigating away.

Summarized with AI on January 25. AI used: gpt-5.

Hi guys,

I am new to Shopify and I’m loving it so far. There is one thing that is bugging me at the moment though.

I am using the dawn theme and on mobile when I click to zoom in on an image it opens it up in a lightbox. There is an ‘X’ to close it, but my first response was to press back, and when I’ve shown friends and family they’ve done the same thing. The issue with this is that it isn’t actually a new page so when you press back, it takes you back to whatever page you was on before the product which creates quite a confusing experience.

Is there anyway to edit this so that when they press back it takes them to the product they were looking at?

I hope this all makes sense and I hope someone can help :slightly_smiling_face:

Hi @MalekiB
We’re BSS Commerce - Shopify Partners & Experts providing Shopify apps and Store Development on Shopify & Shopify Plus.
We saw that you need to button improve Back Button Functionality. It’s what we can help with an optimal solution. If you need help from our expert, kindly share your request with us via Shopify experts .
We will check it and give you a detailed solution. We’re looking forward to working with you.