diff options
author | Ferdinand Thiessen <rpm@fthiessen.de> | 2022-09-05 15:59:37 +0300 |
---|---|---|
committer | max-nextcloud (Rebase PR Action) <max-nextcloud@users.noreply.github.com> | 2022-09-06 09:39:14 +0300 |
commit | db13ec0f46e2f0e0f25429f6294965a4f9241077 (patch) | |
tree | 16064d399846d6f03161521924456eb8689a05e6 | |
parent | 9d69081225c0103d3c68c85d8e000dec2a483748 (diff) |
Fix headlines being hidden behind toolbar (anchor links)
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
-rw-r--r-- | css/prosemirror.scss | 5 | ||||
-rw-r--r-- | src/helpers/links.js | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/css/prosemirror.scss b/css/prosemirror.scss index 68413b7ff..5be68f284 100644 --- a/css/prosemirror.scss +++ b/css/prosemirror.scss @@ -13,6 +13,11 @@ div.ProseMirror { font-size: 14px; outline: none; + :target { + // Menubar height: 44px + 3px bottom + 3px top padding + scroll-margin-top: 50px; + } + &[contenteditable=true], &[contenteditable=false], [contenteditable=true], diff --git a/src/helpers/links.js b/src/helpers/links.js index b4223f9c5..d7446373e 100644 --- a/src/helpers/links.js +++ b/src/helpers/links.js @@ -112,6 +112,7 @@ const openLink = function(event, _attrs) { const el = document.getElementById(fragment) if (el) { el.scrollIntoView() + window.location.hash = fragment return } } |