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:11 +0100 |
| commit | 724b475ea5c5b9f24299a0ccd325e2bafe2eb25f (patch) | |
| tree | 9eb28079d3e95c78a6570598efd6fd32f0df2d86 /resources | |
| parent | d52249e7b05b01389fd472010c45b15081dba17e (diff) | |
Resolve "PageLayout::disableHeader() führt zu Fehlermeldungen im Wysiwyg-Editor"
Closes #6095
Merge request studip/studip!4633
Diffstat (limited to 'resources')
| -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 7b85736..64b8dad 100644 --- a/resources/assets/javascripts/cke/classic-editor.js +++ b/resources/assets/javascripts/cke/classic-editor.js @@ -103,7 +103,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; } |
