hedgedoc / react-client

The frontend of the upcoming version 2.0

Home Page:https://hedgedoc.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anchor navigation in render view not working

ErikMichelson opened this issue · comments

Description
Clicking anchor links in the TOC of the rendered view results in little scrolling movements.
This seems to happen only on netlify deployments but not when running locally?

Expected behavior
Clicking the anchor link should scroll to the corresponding section of the note.

Screenshots
See #1750 (comment)

Okay I investigated this problem.
It seems like this problem appears only in chrome and only if renderer and editor are on the same origin.

My assumption: If editor and renderer are on the same origin it is possible to access the other DOM, therefore they run in the same JS-Runtime instance and we run into this bug.