Linking single image to gallery carousel view breaks if clicked > once
To reproduce:
- Enable Carousel.
- Create a new page with a gallery of images.
- Elsewhere on the page, insert a standalone image that links to a carousel URL from the gallery. Example:
http://example.com/2016/12/the-permalink-here/#jp-carousel-123. - Publish page and open it.
- Click the standalone image. The carousel view of the gallery opens as expected.
- Close out of the carousel view.
- Click the standalone image again. Nothing happens.
It also "works" in reverse. If you click the gallery first instead of the standalone image, carousel opens. But then if you close it and click the single image, nothing happens.
3004435-t
This also "works" if you open a new tab and paste the link directly, then when you close the carousel you are redirected back to empty tab.
Steps to reproduce:
- Copy the link that opens the carousel, for example ( http://example.com/2016/12/the-permalink-here/#jp-carousel-123 )
- Open a new tab and paste the link.
- Close the carousel
What I expected
To stay on page when the carousel is closed.
What happened instead
I was redirected back to empty tab.
I ran into this second flow today on my personal blog. Going to https://eric.blog/#jp-carousel-8080 and then exiting out of the gallery results in me being taken to an empty tab.
I'm running into this issue exactly as described in the original post.
When the stand alone image is clicked after closing the gallery, the #jp-carousel-123 part of the URL is appended in the address bar and then immediately removed. The browser back button flashes at the same time.
The similar unrequested back navigation to an empty tab mentioned by @Stoyan0v above is also described in #6244
This issue has been marked as stale. This happened because:
- It has been inactive in the past 6 months.
- It hasn’t been labeled `[Pri] Blocker`, `[Pri] High`.
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.