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

[CLOSED] Jumping to cursor position in inline editor prevents horizontal scrolling #3461

Open
core-ai-bot opened this issue Aug 29, 2021 · 4 comments

Comments

@core-ai-bot
Copy link
Member

Issue by lkcampbell
Wednesday May 01, 2013 at 19:24 GMT
Originally opened as adobe/brackets#3696


OS: Windows 7

Build: sprint 24 development build 0.24.0-0 (master 58e693b85)

Repro Steps:

  1. Open this gist code in Brackets
  2. Go to the very last line and do a Quick Edit on foo().
  3. Scroll down to the last line in the Inline Editor.
  4. Attempt to read the last long comment by scrolling the Inline Editor horizontally to the right.

Observed Behavior:
The Inline Editor jumps back to the top of its code the moment the mouse clicks on the horizontal bar.

Expected Behavior:
The Inline Editor should scroll left and right without a jump so the long comment can be read.

Workaround:
Click on the last line of inline code, resetting the cursor position in the Inline Editor, then use the horizontal scrolling.

@core-ai-bot
Copy link
Member Author

Comment by pthiess
Monday May 13, 2013 at 18:06 GMT


Reviewed - priority: medium, assigned to NJ

@core-ai-bot
Copy link
Member Author

Comment by njx
Wednesday Jun 12, 2013 at 00:52 GMT


The behavior appears to be due to CodeMirror, but I can't quite trace where the scrolling is happening. When clicking on the scrollbar, CodeMirror tries to re-focus the hidden input area (which then leads to the editor refocusing as well). But I can't figure out exactly how that's causing the scroll, as none of the CodeMirror scrollInto...() functions seem to be getting called. I'm thinking that refocusing the hidden input field (which I think is positioned at the cursor location) is making the browser think it should scroll that hidden field into view. I'm not sure why the same issue doesn't occur with the main editor though.

@core-ai-bot
Copy link
Member Author

Comment by njx
Saturday Jul 12, 2014 at 03:33 GMT


To@RaymondLim

@core-ai-bot
Copy link
Member Author

Comment by lkcampbell
Friday Apr 28, 2017 at 00:45 GMT


This is a strange bug, don't want anyone to have to go down the CodeMirror rabbit hole.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant