Skip to content

Dismissing PR preview banner loses position on the page #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hugovk opened this issue Feb 9, 2024 · 3 comments · Fixed by #251
Closed

Dismissing PR preview banner loses position on the page #246

hugovk opened this issue Feb 9, 2024 · 3 comments · Fixed by #251
Assignees
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@hugovk
Copy link

hugovk commented Feb 9, 2024

Details

  1. Go to https://pep-previews--3649.org.readthedocs.build/pep-0742/#type-narrowing-behavior

You are taken to the desired page and anchor, but a banner is displayed with the text

This page was created from a pull request build

See the build's detail page or pull request readthedocs/readthedocs.org#3649 for more information.

  1. Click the 'x' to dismiss the banner

Expected Result

Stay in the same position on the page.

Actual Result

Takes you to the top of the page.

See also

Originally reported at python/peps#3657

@hugovk hugovk changed the title Dismissing PR preview banner loses position on the apge Dismissing PR preview banner loses position on the page Feb 9, 2024
@humitos
Copy link
Member

humitos commented Feb 9, 2024

Thanks for reporting this. I'm moving it to the addons repository since the issue is on the beta addons.

@humitos humitos transferred this issue from readthedocs/readthedocs.org Feb 12, 2024
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Feb 12, 2024
@humitos humitos added Bug A bug Accepted Accepted issue on our roadmap labels Feb 12, 2024
@humitos humitos self-assigned this Feb 13, 2024
humitos added a commit that referenced this issue Feb 14, 2024
* When clicking on the X, now it calls `preventDefault()` to avoid moving to the top
* I added some `id=` attributes in the index page to test this manually

Closes #246
@humitos humitos moved this from Planned to Needs review in 📍Roadmap Feb 14, 2024
humitos added a commit that referenced this issue Feb 19, 2024
* When clicking on the X, now it calls `preventDefault()` to avoid
moving to the top
* I added some `id=` attributes in the index page to test this manually

Closes #246
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Feb 19, 2024
@ericholscher
Copy link
Member

This should now be deployed, and I confirmed it's working 👍

@hugovk
Copy link
Author

hugovk commented Feb 20, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants