Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing end doesn't scroll all the way to the end of a line #745

Closed
1 of 3 tasks
TheV360 opened this issue Oct 26, 2018 · 18 comments · Fixed by #1660
Closed
1 of 3 tasks

Pressing end doesn't scroll all the way to the end of a line #745

TheV360 opened this issue Oct 26, 2018 · 18 comments · Fixed by #1660

Comments

@TheV360
Copy link

TheV360 commented Oct 26, 2018

Nature of issue?

  • Found a bug
  • Existing feature enhancement
  • New feature request

Details about the bug:

  • Web browser and version: Firefox 63
  • Operating System: Windows 10 1803
  • Steps to reproduce this:
  1. Make file with a very long line of code that doesn't fit on the screen.
function heck() {
  extremelyLongFunctionCall(helloWorld, xCoordinate, yCoordinate, otherVariableName, runningOutOfCreativeVariableNames, test, justRanOutOfVariableNames);
}
  1. On the long line of code, press End.
  2. You'll see that while the cursor moved to the end of the line correctly, the scrollbar didn't catch up to it, and you can't easily see what's at the end of the line without dragging the scrollbar.
@catarak
Copy link
Member

catarak commented Oct 28, 2018

thanks for reporting! i've changed the styling of CodeMirror a bunch, so I wonder if it has to do with that.

@bhawesh96
Copy link
Contributor

bhawesh96 commented Nov 11, 2018

As far as I could figure out, it has to do something related the margin-right attribute in the .CodeMirror-scroll class in _codemirror.scss.

@catarak
Copy link
Member

catarak commented Nov 12, 2018

@bhawesh96 thanks for looking into that!

@siddharthshah3030
Copy link

@catarak
I would like to solve this issue but can't figure out how to approach
I tried modifying the file mentioned by @bhawesh96
and tried changes in CSS attributes
but it didn't seem to work for me
I'm using chrome (Manjaro Linux)

@LakshSingla
Copy link
Contributor

thanks for reporting! i've changed the styling of CodeMirror a bunch, so I wonder if it has to do with that.

Can you tell some key areas where you have modified the code so that I can take a look at it ?

@catarak
Copy link
Member

catarak commented Feb 20, 2019

@bmoren
Copy link

bmoren commented Mar 1, 2019

I'd also like to add that there is an issue while typing that I believe is related to this one where the scroll bar is not caught up to the overflowing text:

ezgif com-optimize

@catarak
Copy link
Member

catarak commented Mar 1, 2019

@bmoren that does look like the same issue!

@bmoren
Copy link

bmoren commented Mar 7, 2019

related, flexbox issue:

codemirror/codemirror5#4142

@catarak
Copy link
Member

catarak commented Mar 20, 2019

the CodeMirror editor is in a flexbox container, so it could the same issue that @bmoren linked to.

@shakti97
Copy link
Contributor

shakti97 commented Mar 4, 2020

I think we can close this issue as I can see we are now not using the horizontal scroll with the editor and vertical scroll is working fine

@aldrinjenson
Copy link

Yes, this issue is no more a problem. Now the code wraps down to the next line. Please close the issue.

@TheV360
Copy link
Author

TheV360 commented Mar 23, 2020

The previous two comments are saying that this is fixed, but I went into settings, disabled Word Wrap, and immediately got the issue to happen again.

2020-03-22_21-21-14

@sagar-joshi
Copy link
Contributor

The actual issue was with codemirror and now it has been fixed in codemirror.
codemirror/codemirror5#6436

@catarak
Copy link
Member

catarak commented Oct 13, 2020

The actual issue was with codemirror and now it has been fixed in codemirror.

Wow really?! That's exciting. I'll leave this open until there's a new Codemirror release and this can be updated!

@sagar-joshi
Copy link
Contributor

Wow really?!

I had tested with 'fixedGutter : true' and scrolling was working perfect. The problem was with 'fixedGutter : false' (and currently fixedGutter is set to false in p5js web editor). Now it is fixed in codemirror. So it should work.

@sagar-joshi
Copy link
Contributor

@catarak codemirror has released new v5.58.2

@catarak
Copy link
Member

catarak commented Oct 30, 2020

@sagar-joshi thank you! I'll make a PR that fixes this 😄

catarak added a commit that referenced this issue Oct 30, 2020
catarak added a commit that referenced this issue Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants