Skip to content
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

Custom root for sites that break scrolling? notion.site, etc #4517

Open
mcint opened this issue Jul 15, 2024 · 1 comment
Open

Custom root for sites that break scrolling? notion.site, etc #4517

mcint opened this issue Jul 15, 2024 · 1 comment

Comments

@mcint
Copy link

mcint commented Jul 15, 2024

Rationale
I'm posting this because I had some success in 15 minutes of learning how to fix scrolling for notion sites. Practically speaking, it's currently not even a workaround. I want to raise my finding to the attention of someone who could quickly, easily confirm this diagnosis and proposed solution.

Describe the bug
Notion and some other sites that break vimium interaction seem to perform scrolling in a custom viewport of the main document. I would like to manually set the activated element interactively, and eventually, specify a custom default scrolling element for *.notion.site sites, the user sites that break browser (Space/Shift-Space) and vimium (j/k+d/u,...) scrolling by default.

To Reproduce
Currently, when I click on the page, the browser, per notion's defaults, sets document.activeElement = <body class="notion-body vsc-initialized">...

If I instead set the active element to the root tag of their client reader hierarchy, browser scrolling works as expected, though vimium scrolling stays broken.
console: document.activeElement = $('main'), then return focus to the page without clicking, C-l selects URL bar,

  • In DevTools, with not-Console, say Elements, tab open.
  • Type Esc, toggling closed Console.
  • Type Ctrl-L, focusing the URL bar.
  • Type Esc twice, first deselecting the URL bar, and after the second, input is handled by the page.
    • Try browser keyboard scrolling, Space/Shift-Space, expected to work
    • Try vimium keyboard scrolling, j/k or d/u, still broken

Browser and Vimium version

  • Brave: 1.67.123 Chromium: 126.0.6478.126 (Official Build) (64-bit) / Linux
  • Vimium: 2.1.2
@UncleSnail
Copy link
Contributor

Allowing a custom root per site seems like a reasonable idea.

I'm not sure, but this might be a bug in nextFrame, since I think that might be what that function is meant to be for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants