openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

go back where you came from link doesn't do anything

Open RayBB opened this issue 1 year ago • 2 comments

Problem

I'm on mobile so can't investigate more but the link doesn't do anything and I can't even copy it. Not sure what's up with that.

Evidence / Screenshot

Relevant URL(s)

https://openlibrary.org/works/OL264247W

Reproducing the bug

  1. Go to ...
  2. Do ...
  • Expected behavior:
  • Actual behavior:

Context

  • Browser (Chrome, Safari, Firefox, etc):
  • OS (Windows, Mac, etc):
  • Logged in (Y/N): Y
  • Environment (prod, dev, local): prod

Notes from this Issue's Lead

Proposal & constraints

Related files

Stakeholders


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

RayBB avatar Aug 05 '24 09:08 RayBB

Here's my assumption of what is happening. Someone uses a separate app, like slack, where there is no js history, to go to an Open Library page which has a "go back" link powered by javascript and clicking this link does nothing.

The impact is pretty minimal, granted it's a bit confusing. The proposed solution is, when the javascript history.go(-1); (which is what powers the go back link) is not defined, then either: default to Open Library homepage or, if there's a non-hacky way, don't show the link.

Acceptance criteria: @jimchamp suggests also moving the link action out of inline html and into js to handle either the history.go(-1) or redirect to openlibrary.org homepage.

mekarpeles avatar Aug 05 '24 20:08 mekarpeles

Hello, I'd like to be assigned to this issue

schu96 avatar Aug 22 '24 22:08 schu96