[IPython-User] autoscrolling in html notebook
Sun Jan 22 14:26:13 CST 2012
Many thanks for your comments! I see that there is a serious obstacle
here, and I agree that if one did what I was inquiring about, that could
lead to some unexpected behaviour. It just so happened that I had never
encountered those cases, so they didn't bug me. But your point is taken.
However, the question about scrolling up could be still valid, couldn't
it? When one is scrolling up, one does not expect output from anywhere,
one just wants to get to the top of the page. This does not involve
autoscrolling, for the user is doing it.
On 01/22/2012 08:18 PM, Brian Granger wrote:
> The situation is a bit more complex. This past summer, I spent
> probably 3-4 days working on the scrolling model for the notebook. We
> spent considerable time studying the scrolling behavior of different
> applications. It was one of the more difficult things to get right.
> I can summarize the main issues and explain the model...
> * The overarching theme in the scrolling model is that we put the use
> in charge of the scrolling. This means that we don't try to guess
> when and where they want the notebook div to be scrolled, we let them
> make that decision.
> * The reason we went this route is that each time we tried to scroll
> the notebook for them, we would sometimes guess wrong leading to very
> frustrating behaviors - more frustrating than requiring the user to
> scroll it themselves. It also lead to glitches.
> * One difficulty we faced is that browsers make scrolling decisions on
> their own based on what element in a div is has focus. We found that
> when we tried to scroll the window, we ended up "arguing" with the
> browsers built-in scrolling behavior. We would scroll up, it would
> scroll down - glitchy. The only way out of this is to *completely*
> take over the scrolling ourselves. Getting that right would be
> extremely difficult.
> * The other, more fundamental issue, it the asynchronous behavior of
> the notebook. There *are* a few cases where we *do* currently scroll
> the notebook for the user. One case is after the last cell is
> executed we scroll the notebook to the bottom. You should then ask
> "wait, then why doesn't my plot show!?" The answer is that the
> scroll-to-the-bottom is done after the code is submitted and the new
> cell is created, but *before* the output is returned. We have no
> control over when the output arrives - it could be nearly instant, or
> it could take 12 hours. If we were to wait until output arrives and
> then scroll it into view, users will be equally unhappy - the current
> thing they were working on would scroll out of view.
> Hope this clarifies the notebook scrolling.
> 2012/1/20 Zoltán Vörös<firstname.lastname@example.org>:
>> Hi All,
>> I was just wondering whether there is a trick to scroll to the bottom of
>> the page in the html notebook. What I mean is the following: suppose
>> that I have some code that produces a plot. The plot might very well be
>> bigger than the screen. If I run the code, what happens is that the
>> cursor jumps to the next cell, but that cell will be below the bottom of
>> the browser. So, in effect, I don't see the cursor, nor the plot just
>> created. Is there a way to make the browser scroll to the proper
>> position? By the way, this happens in the opposite direction, too,
>> namely, if I move up with the cursor pressing the "Up" arrow diligently,
>> when I get to the first, cell, the browser does not move any more, even
>> if the cursor is above the top of the visible field
>> IPython-User mailing list
More information about the IPython-User