diff options
| -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; } |
