Creating CodeMirror on detached element breaks scrolling #1793

Closed
opened 2013-08-30 18:28:12 +02:00 by marijnh · 3 comments
marijnh commented 2013-08-30 18:28:12 +02:00 (Migrated from gitlab.com)

Creating CodeMirror on detached element (which gets attached in future) breaks
CM scrolling behavior.

Step-by-step:

  • Go to codemirror theme demo
  • Evaluate the following code in js console
a = new Array(6000).join("foobar\n");
e = document.createElement("div");
c = new CodeMirror(e);
c.setValue(a);
document.body.appendChild(e);
c.refresh();
  • Try to scroll codemirror. See how scroll drastically lags behind the mouse

Adding @vsevik here as he might be aware of some more details.

Creating CodeMirror on detached element (which gets attached in future) breaks CM scrolling behavior. Step-by-step: - Go to codemirror [theme demo](http://codemirror.net/demo/theme.html) - Evaluate the following code in js console ``` javascript a = new Array(6000).join("foobar\n"); e = document.createElement("div"); c = new CodeMirror(e); c.setValue(a); document.body.appendChild(e); c.refresh(); ``` - Try to scroll codemirror. See how scroll drastically lags behind the mouse Adding `@vsevik` here as he might be aware of some more details.
marijnh commented 2013-09-04 16:41:09 +02:00 (Migrated from gitlab.com)

Friendly ping

Friendly ping
marijnh commented 2013-09-05 11:23:07 +02:00 (Migrated from gitlab.com)

Does the attached patch fix the problem for you?

Does the attached patch fix the problem for you?
marijnh commented 2013-09-05 11:29:10 +02:00 (Migrated from gitlab.com)

Yes, it does.
Thank you!

Yes, it does. Thank you!
marijnh (Migrated from gitlab.com) closed this issue 2013-09-05 11:30:39 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/codemirror5#1793
No description provided.