Skip to content

x/pkgsite: "#Directories" rendering issue, likely due to hydrated DOM ID clash #75630

@jfrech

Description

@jfrech

What is the URL of the page with the issue?

https://pkg.go.dev/net/http#section-directories

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36

Screenshot

Image

What did you do?

Look at https://pkg.go.dev/net/http#section-directories with ECMAScript enabled, in a wide window.

What did you see happen?

The documentation link for [net/http/cookiejar] went missing.

I assume this is caused by a DOM ID clash:

$ curl -fsSL https://pkg.go.dev/net/http | grep -i 'id="cookiejar"'
    <h4 tabindex="-1" id="CookieJar" data-kind="type" class="Documentation-typeHeader">
    <td data-id="cookiejar" data-aria-owns="">

Note that both [net/http.CookieJar] (the symbol) and [net/http/cookiejar] (the package) exist.

When disabling scripting, the issue doesn't arise. With a narrow window, the issue doesn't arise.

Curiously, [image/color.Palette] and [image/color/palette] don't lead to a rendering issue; but [image/color] also has exactly one sub-package, which might play into the rendering:

$ curl -fsSL https://pkg.go.dev/image/color | grep -i 'id="palette"'
    <h4 tabindex="-1" id="Palette" data-kind="type" class="Documentation-typeHeader">
    <td data-id="palette" data-aria-owns="">

What did you expect to see?

The documentation link for [net/http/cookiejar] to properly render.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.help wantedpkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions