Custom root for sites that break scrolling? notion.site, etc
Opened this issue · 1 comments
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
, sayElements
, tab open. - Type
Esc
, toggling closedConsole
. - 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
ord
/u
, still broken
- Try browser keyboard scrolling,
Browser and Vimium version
- Brave:
1.67.123 Chromium: 126.0.6478.126 (Official Build) (64-bit)
/ Linux - Vimium:
2.1.2
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?