Document hack

This commit is contained in:
Sergio Padrino 2024-05-10 13:02:07 +02:00
parent 42fbe62b9d
commit d3e8913885

View file

@ -290,6 +290,8 @@ export class SandboxedMarkdown extends React.PureComponent<
// Not sure why the content height != body height exactly. But we need to
// set the height explicitly to prevent scrollbar/content cut off.
// HACK: Add 1 to the new height to avoid UI glitches like the one shown
// in https://github.com/desktop/desktop/pull/18596
const divHeight = this.contentDivRef.clientHeight
this.frameContainingDivRef.style.height = `${divHeight + 1}px`
this.props.onMarkdownParsed?.()