diff options
| author | Ann Yanich <ann@yanich.de> | 2025-12-08 14:53:11 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-12-08 15:53:53 +0100 |
| commit | bb5f3b40cff11e34646f78ad1ac3ca5c41b9ade3 (patch) | |
| tree | cef0afd9b431366fb938218f74a6951b9e05a6f7 | |
| parent | 20c40719edb1d85de8c9682f319e988558d95c4c (diff) | |
Resolve "PageLayout::disableHeader() führt zu Fehlermeldungen im Wysiwyg-Editor"
Closes #6095
Merge request studip/studip!4633
| -rw-r--r-- | resources/assets/javascripts/cke/classic-editor.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/assets/javascripts/cke/classic-editor.js b/resources/assets/javascripts/cke/classic-editor.js index 09369f6..c006637 100644 --- a/resources/assets/javascripts/cke/classic-editor.js +++ b/resources/assets/javascripts/cke/classic-editor.js @@ -98,7 +98,10 @@ function getViewportOffsetTop() { const topBar = document.getElementById('top-bar'); const responsiveContentbar = document.getElementById('responsive-contentbar'); - let top = topBar.clientHeight + topBar.clientTop; + let top = 0; + if (topBar) { + top += topBar.clientHeight + topBar.clientTop; + } if (responsiveContentbar) { top += responsiveContentbar?.clientHeight + responsiveContentbar.clientTop; } |
