Skip to content

Horizontal scrolling not working properly with fixedGutter option set to false #6436

@sagar-joshi

Description

@sagar-joshi

With fixedGutter:false

  1. On pressing end button in a line , the cursor moves to the end of the line but scrollbar does not catch up. We have to drag the scrollbar to the end to see the rightmost text.
  2. Same thing happens when we type anything at the end of the line.

But with fixedGutter:true scrolling works properly.

var myCodeMirror = CodeMirror(document.getElementById('editor'), {
  value: "function myScript(){console.log(\"100\");}\nconsole.log(\"test test test test test test test test 

test test test test test test test test test test test test test test test test test test test test test test 

test test test test test test\");\n\n\n\n\n\n\n\n\n\n\n\n\n",
  mode:  "javascript",
  lineNumbers: true,
  fixedGutter: false,
});

ezgif com-gif-maker

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