From ec63c15a400bcb2f981e83b8adbe2116504ad03d Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 14 Aug 2021 22:17:42 -0400 Subject: [PATCH] ace2_inner: Simplify document body selection --- src/static/js/ace2_inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 90c08ab4..c6e77947 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3543,7 +3543,7 @@ function Ace2Inner(editorInfo, cssManagers) { // but as it's non-text type the line-height/margins might not be present and it // could be that this breaks a theme that has a different default line height.. // So instead of using an integer here we get the value from the Editor CSS. - const innerdocbody = document.querySelector('#innerdocbody'); + const innerdocbody = document.body; const innerdocbodyStyles = getComputedStyle(innerdocbody); const defaultLineHeight = parseInt(innerdocbodyStyles['line-height']);