Auto-scrolling of long output should be configurable in the UI #2172

fperez opened this Issue Jul 20, 2012 · 19 comments
IPython member

We've had on-list, in person and here (#2154) various requests for different thresholds or behaviors regarding auto-scrolling. Ultimately there's no one good default that fits all cases, so this should have a UI control for users to enable/disable the feature as well as changing the threshold.


Continuing the discussion from #2154.
I didn't have "multi-thousand line cells" in mind and what you said makes sense. I think the problem is two-fold: one is that every has different threshold as you said; the other is that the threshold for editing and viewing is different. Please consider having two different configurable variable to set the threshold.


Hey all, sorry to bother, but what is the status on this?

It would be great if this functionality (ability to turn on or off auto-scrolling of cell output) could also be attached to a toggle parameter unique for each cell. Sometimes there are things that I want to be printed out in their entirety (such as a list of plots generated in a loop), while other times, auto-scrolling for a long printed output is preferable.

Is this much work to implement?

IPython member


I see that this is marked as wishlist, this mostly mean that there are no date planned for this feature.
But would someone implement it correctly, it would have chances to be merged.

configure it globally shouldn't be hard :

OutputArea.prototype._should_scroll = function(){return false}

Plus write the UI. On a per/cell basis slightly more difficult as this lives in OutputArea, and Cell does have the metadata.

So difficulty, I would say medium, because it is long to do, and involve a lot of cases where you desactivate while it is collapsed... and so on on so forth.

I think we should be able to have enough hooks to allow the configurability on a per cell basis through extensions.


Thanks @Carreau for the reply! I will use the tip suggested and if I get time, I will dig in more and see how I can contribute!

IPython member

I think the right answer is to add 'scroll' state to the output area, with three states: true / false / auto. Should be easy enough.

IPython member
IPython member

@ellisonbg I'm not talking about making it configurable, I'm just talking about recording state - right now there is no information about whether the user has told a cell to stay uncollapsed, so if more output comes it is automatically collapsed again, which is super annoying. Recording the autoscroll state, just like we already do with the collapsed state, solves that issue. No configuration is added.

IPython member

@minrk, if this could be implemented, that would be awesome. I am just starting to dig into IPython development (a wonderful tool btw, thank you for all the work), so I will have to dedicate some time looking into this, when I am able. Not much time now, but will try hopefully soon. :)


@minrk did this ever get implemented? I'm still seeing auto-scrolling getting reset after re-evaluating cells in IPython 2.2.

IPython member

Nope, not yet. The metadata for the state is added in nbformat 4, but the code hasn't been written.


To fix the annoyances temporarily, create a code block with:

IPython.OutputArea.auto_scroll_threshold = 9999;

and execute.


this died :(
i would appreciate the feature 👍



@minrk minrk modified the milestone: 3.0, wishlist Jan 23, 2015
@Carreau Carreau closed this in #7522 Jan 25, 2015
dwt commented Apr 3, 2015

I'd like to add another use case here, I would often like to use graphs that are slightly larger than the default scroll region size, which makes them very awkward to use (bokeh user here). So please allow setting the threshold some way.


Just because I found this earlier than the right solution (and the above didn't work anymore to disable the scolling):

-> just execute the JS in a %%javascript does the trick...


wish it was a thing


I just found this issue since I was googling to figure out how to turn off auto scrolling. It would be useful and appreciated if someone had time to fix this. I mean the ability to turn auto-scrolling on and off. Thanks.


I had trouble getting the above javascript to work on my computer, but I was able to get the ipython notebook extensions here to work:

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