CodeMirror-gutter Re-size #3781

Closed
wissamsaikali opened this Issue Jan 19, 2016 · 7 comments

Projects

None yet

4 participants

@wissamsaikali

i am using the merge plugin. ( https://codemirror.net/demo/merge.html )

Scenario :
1 - Write a long commands on the same line
2- try to scroll right than left
3- gutters will move

Please check the attached files
i've tried to refresh the editor but it didn't worked .
how can i fix this ?

Thank you
Regards
screencapture-codemirror-net-demo-merge-html-1453211741453

@marijnh
Member
marijnh commented Jan 20, 2016

Hi. This does not happen for me on Chrome. Which browser / version are you using?

@wissamsaikali

Hey, i am using Version 47.0.2526.111 (64-bit) on ubuntu

On Wed, Jan 20, 2016 at 11:54 AM, Marijn Haverbeke <notifications@github.com

wrote:

Hi. This does not happen for me on Chrome. Which browser / version are you
using?


Reply to this email directly or view it on GitHub
#3781 (comment)
.

@marijnh
Member
marijnh commented Jan 20, 2016

Hm, that's exactly what I'm using. Could you describe your steps in more detail? When I go to the merge demo page, and scroll either of the editors right and then left, the gutter stays in place.

@wissamsaikali
  1. Go the merge demo page
  2. Keep adding additional characters at the end of any line till the
    scrollbar on the left editor becomes clearly smaller than the one on the
    right
  3. Now when you scroll left and right on the left editor you will notice
    that the gutter will shift to the right

PS: this issue appears on Chrome Windows as well.

Thank you

On Wed, Jan 20, 2016 at 12:03 PM, Marijn Haverbeke <notifications@github.com

wrote:

Hm, that's exactly what I'm using. Could you describe your steps in more
detail? When I go to the merge demo page, and scroll either of the editors
right and then left, the gutter stays in place.


Reply to this email directly or view it on GitHub
#3781 (comment)
.

@kepta
kepta commented Jan 22, 2016

+1, I was able to reproduce it on
Browser Firefox
Mac

@rtparsons rtparsons added a commit to rtparsons/CodeMirror that referenced this issue Jan 23, 2016
@rtparsons rtparsons Fix for issue #3781 CodeMirror-gutter Re-size
Gutter on non-editable window adding offset for changes made in
editable window.
e9a4658
@rtparsons

Pull request to fix this #3788

@marijnh marijnh added a commit that closed this issue Jan 24, 2016
@marijnh marijnh Fix clipping of horizontal scroll positions
To avoid messing up the position of the gutter when an offset
bigger than the max offset is given.

Closes #3781
Closes #3788
29555c9
@marijnh marijnh closed this in 29555c9 Jan 24, 2016
@marijnh
Member
marijnh commented Jan 24, 2016

The editor was clipping the horizontal scroll position wrong, leading to it believing it was setting its horizontal scroll somewhere the DOM wouldn't allow it to, confusing the gutter alignment code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment