Skip to content

Commit

Permalink
Fixed ace2_inner firstElementChild
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Dec 4, 2024
1 parent 430b5a2 commit 708e3e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/static/js/ace2_inner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 708e3e1

Please sign in to comment.