[Bug] Item it toc.yml without topicUid links the parent page causing side-effects because of multiple links pointing to the same page
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 10
Description
**Describe the bug**
In previous versions of docfx (ca. 2.59.x), this kind of toc would work as expected:
```yaml
- name: How To...
items:
- name: Migrate to RazorComponent
topicUid: NetCode.Razor.MigrateToV10
```
The item `How To...` didn't have an own link, which was fine.
Now using 2.67.2 the `How To...` has a link, specifically pointing to the parent page.
This sounds harmless, but it breaks the behavior of clicking on a parent page.
So if I go to http://docs2sxc.dnndev.me/net-code/index.html and click on this link:

It _should_ look like this:

BUT it immediately scrolls down to:

Because `How to...` has the same link, and the "scroll to selected " will scroll to the last selected link with that target.
**To Reproduce**
1. Create some tocs - make sure that you have many, so that toc-scrolling is necessary
2. Further down create some `item` without a `href` or `topicUid` etc.
3. Observe that the generated HTML does actually have a link on it (bug)
4. click on another link that should go to the same url - and it will scroll to the title which _shouldn't_ have a link
**Context (please complete the following information):**
- OS: Windows
- Docfx version: 2.67.2 but probably many before (we skipped many version
Contributor guide
Assessment
This issue has not been assessed yet.