From 708e3e1d66910251543b75b28f9ad8634de19449 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Wed, 4 Dec 2024 20:00:23 +0100 Subject: [PATCH] Fixed ace2_inner firstElementChild --- src/static/js/ace2_inner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.ts b/src/static/js/ace2_inner.ts index 15db776e1..709840f80 100644 --- a/src/static/js/ace2_inner.ts +++ b/src/static/js/ace2_inner.ts @@ -3475,7 +3475,7 @@ function Ace2Inner(editorInfo, cssManagers) { // use that for displaying the side div line number inline with the first line // of content -- This is used in ep_headings, ep_font_size etc. where the line // height is increased. - const elementStyle = window.getComputedStyle(docLine.firstChild); + const elementStyle = window.getComputedStyle(docLine.firstElementChild); const lineHeight = parseInt(elementStyle.getPropertyValue('line-height')); const marginBottom = parseInt(elementStyle.getPropertyValue('margin-bottom')); lineHeights.push(lineHeight + marginBottom);