Skip to content

some links to ids break rendering #401

@Rudxain

Description

@Rudxain

Note

I tried to find a minimal repro then gave up.

this bug seems non-deterministic

  1. Run elinks https://eslint.org/docs/latest/rules/
  2. Move the cursor down to the "Skip to main content", then hit it
  3. At the time of writing, you should be taken to https://eslint.org/docs/latest/rules/#main
  4. Briefly, it seems to go to the heading, but then the entire viewport becomes blank, almost as if there was no content. No way to scroll. Going back (left arrow) does nothing
  5. The status-line shows "OK"

This problem seems to manifest most of the time, but I've seen cases when it properly moves the viewport to the target heading. It's worth noting that (at the time of writing), the relevant DOM slice looks like this in Firefox (JS disabled):

<main id="main" tabindex="-1" class="docs-main">
  <div class="docs-main__content">
    <h1>Rules Reference</h1>
<!-- ... -->

The fact that the element with id is not the heading, but instead a <main>, seems to imply the problematic behavior only happens with <main>

Firefox has no problem with the link (use Tab to focus on "Skip to main content").

Running elinks 'https://eslint.org/docs/latest/rules/#main' seems to never trigger the bug


Another bug, possibly related is here, when hitting the link "GPUI: the `Element` trait" ("On this page" section). It briefly moves the viewport properly, but then it moves it somewhere unrelated (seems like the cursor almost always ends up at "etagere"?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions