huggingface / huggingface/doc-builder

[Bug] - Open a doc reference in a new tab wrongly exchange the current page navigation content for the ones of the newly opened page

Open
#486 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
144
Forks
59
Avg merge
2d 5h
Merged PRs (30d)
13

Description

Steps to reproduce:
1. Open any document in the site. In this case is the [models cards](https://huggingface.co/docs/hub/model-cards) document
2. Open any other document reference in a new tab. In this case Ctrl + Click [models downloading](https://huggingface.co/docs/hub/models-downloading) from the left-side nav-bar

Original state:
![image](https://github.com/huggingface/doc-builder/assets/48109042/f619f15b-fb44-4a99-a858-4d52373a36ba)

Original page scrambled after opening another document in a new tab:
![image](https://github.com/huggingface/doc-builder/assets/48109042/229b7982-3e71-4779-80e9-873c39549e72)

Notice, besides being on the same page, same tab, all the layout surrounding the document is broken. The next and prev pointers are now the ones from the recently opened tab, same for the left nav-bar and the right side overview / document structure.

Opening a new link (from that page) in a new tab should not change the content of the navbars in the original page.

Tested in:
- Firefox 123.0.1
- Chrome 123.0.6312.58

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.