.codemirrorparent { transform: rotateY(180deg); } at initialization results in incorrect initial line number position. #2444

Closed
opened 2014-04-06 23:26:58 +02:00 by marijnh · 6 comments
marijnh commented 2014-04-06 23:26:58 +02:00 (Migrated from gitlab.com)

The issue is the result of this call returning an "incorrect" value:
github.com/marijnh/CodeMirror@17a9de99ed/lib/codemirror.js (L592)

Reduced test case:

  1. Visit: http://emberjs.jsbin.com/nosap/4
  2. Click the "CODE" link in the "STATE" header (top-left ish) to flip to the editing view.
  3. Note the line number positions. (They re-adjust after a carriage return.)

Issue exists identically in Firefox, Chrome, and Safari. Untested elsewhere.

NOTE: If you're testing this in Chrome you will run into this bug:
https://code.google.com/p/chromium/issues/detail?id=359657

The issue is the result of this call returning an "incorrect" value: https://github.com/marijnh/CodeMirror/blob/17a9de99ed61dbcc78fc54bc77bfe5b4ea140e9f/lib/codemirror.js#L592 Reduced test case: 1. Visit: http://emberjs.jsbin.com/nosap/4 2. Click the "CODE" link in the "STATE" header (top-left ish) to flip to the editing view. 3. Note the line number positions. (They re-adjust after a carriage return.) Issue exists identically in Firefox, Chrome, and Safari. Untested elsewhere. NOTE: If you're testing this in Chrome you will run into this bug: https://code.google.com/p/chromium/issues/detail?id=359657
marijnh commented 2014-04-07 11:39:15 +02:00 (Migrated from gitlab.com)

Duplicate of #2443

Duplicate of #2443
marijnh (Migrated from gitlab.com) closed this issue 2014-04-07 11:39:15 +02:00
marijnh commented 2014-04-07 16:13:51 +02:00 (Migrated from gitlab.com)

I didn't call it a duplicate because (from what I can tell) it's a different calculation function: cursorCoords() as compared to getDimensions().

From my quick glance over the code they aren't dependent upon each other. To make a general "works with transforms" fix we'd need to do both of these.

I didn't call it a duplicate because (from what I can tell) it's a different calculation function: `cursorCoords()` as compared to `getDimensions()`. From my quick glance over the code they aren't dependent upon each other. To make a general "works with transforms" fix we'd need to do both of these.
marijnh commented 2014-04-07 16:17:54 +02:00 (Migrated from gitlab.com)

Ah, the body text of the issue was so similar to the other bug that I assumed you double-submitted.

Ah, the body text of the issue was so similar to the other bug that I assumed you double-submitted.
marijnh (Migrated from gitlab.com) reopened this issue 2014-04-07 16:17:54 +02:00
marijnh commented 2014-04-07 16:18:38 +02:00 (Migrated from gitlab.com)

Still, the underlying issue is exactly the same, so I suggest we do move discussion to the other issue entirely.

Still, the underlying issue is exactly the same, so I suggest we do move discussion to the other issue entirely.
marijnh (Migrated from gitlab.com) closed this issue 2014-04-07 16:18:38 +02:00
marijnh commented 2014-04-07 16:20:02 +02:00 (Migrated from gitlab.com)

Okay, I'll rename the other bug to be a bit more inclusive. :)

Okay, I'll rename the other bug to be a bit more inclusive. :)
marijnh commented 2014-04-07 17:24:13 +02:00 (Migrated from gitlab.com)

FYI - if CM is ever going to function properly on Android or iOS devices with scaling enabled, this is a problem that's going to have to be solved. My time has been completely eaten since I began working on the iOS plugin, but a large chunk of that code came from having to work around this exact issue.

FYI - if CM is ever going to function properly on Android or iOS devices with scaling enabled, this is a problem that's going to have to be solved. My time has been completely eaten since I began working on the iOS plugin, but a large chunk of that code came from having to work around this exact issue.
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#2444
No description provided.