Skip to content

Overflow lines get cut off #741

@Beebeeoii

Description

@Beebeeoii

I am having the issue where the last few lines of the CodeMirror editor gets cut off. Seems like there is potentially a miscalculation on the scroll height?

Appreciate any help thanks!

<Collapsible className="flex flex-col w-full h-full outline outline-gray-300">
  <div className="flex h-8 items-center justify-between px-4 bg-gray-100">
    ...
  </div>

  <CollapsibleContent className="flex flex-col h-full overflow-hidden">
    <CodeMirror
      key={editorKey}
      ref={editorRef}
      className={className}
      value={value}
      style={{ overflow: 'auto' }}
      readOnly={readOnly}
      extensions={extensions}
      onCreateEditor={handleCreateEditor}
    />
  </CollapsibleContent>
</Collapsible>

Demo:
Notice that line 541 is cut off, and also there should be 543 lines in total (2 lines are missing). Code content is blurred for privacy reasons.

Untitled.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions