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

Arbitrary scrolling (jumping) in clicks in modal UI for notebook #4809

Closed
fonnesbeck opened this issue Jan 16, 2014 · 6 comments · Fixed by #4929
Closed

Arbitrary scrolling (jumping) in clicks in modal UI for notebook #4809

fonnesbeck opened this issue Jan 16, 2014 · 6 comments · Fixed by #4929
Assignees
Milestone

Comments

@fonnesbeck
Copy link

I am experiencing jumping behavior in the new modal UI for IPython notebook much more than I ever did in the original UI. Specifically, clicking into a large cell will arbitrarily scroll upward from the location where I click. I've prepared a movie that shows this behavior explicitly.

Running in Safari 7.0.1 on OS X 10.9.1 using IPython built from master 2 days ago.

@ellisonbg
Copy link
Member

@fonnesbeck thanks for the report. I think this issue is caused by CodeMirror, but let's see if we can track it down. I think the issue is that when you click on an editor area, CodeMirror will focus the prompt. If the prompt is off screen the browser will scroll it into view. I have a feeling that the logic CodeMirror uses is to jump to the last position of the cursor. Can you play around with your example to see what happens if you first move the cursor to the bottom of the cell, then click away, scroll most of the cell above, then click back.

Also, to test this hypothesis, you can try clicking on the prompt area of the cell - it shouldn't jump. Then if you hit "enter" to enable edit mode, you should see the jump.

I will try to play around with this as well. But I have a feeling this will be tough to fix give the behavior is burried in CodeMirror and probably is the right thing to do (otherwise if you start typing it will be off screen).

@fonnesbeck
Copy link
Author

In the movie, it does not scroll right up to the top (if "the prompt" is what I think it is).

@fonnesbeck
Copy link
Author

Sometimes it scrolls upward, sometimes down. Happens a lot, though, and makes editing large cells pretty tough.

@fonnesbeck
Copy link
Author

Here's another example where it scrolls up to the previous cursor location.

@ellisonbg
Copy link
Member

@fonnesbeck I think I have fixed these issues in PR #4929 can you test and confirm the fix?

@fonnesbeck
Copy link
Author

Based on testing with 2 arbitrary notebooks, it looks good. I will continue working from this PR for awhile and see if anything crops up.

@minrk minrk closed this as completed in 9b8c058 Feb 1, 2014
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Fixing various modal/focus related bugs

closes ipython#4809
closes ipython#4951
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.

2 participants