Skip to content

Commit

Permalink
Merge pull request #2862 from nextcloud/fix/2859
Browse files Browse the repository at this point in the history
Fix headlines being hidden behind toolbar (anchor links)
  • Loading branch information
max-nextcloud authored Sep 6, 2022
2 parents 9d69081 + 8225814 commit faff5d1
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 15 deletions.
5 changes: 5 additions & 0 deletions css/prosemirror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/helpers/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const openLink = function(event, _attrs) {
const el = document.getElementById(fragment)
if (el) {
el.scrollIntoView()
window.location.hash = fragment
return
}
}
Expand Down

0 comments on commit faff5d1

Please sign in to comment.