-
Notifications
You must be signed in to change notification settings - Fork 945
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
Disable scrolling of Output widget #1791
Comments
Definitely! This should be pretty straightforward to do. |
For whoever wants to take this on, it will likely involve changes in the python side: https://github.com/jupyter-widgets/ipywidgets/blob/master/ipywidgets/widgets/widget_output.py as well as the js sides:
|
I think I would prefer a view-level control, like in the notebook (clicking on the prompt area toggles the scroll state). That may be (a) easier to implement and (b) more natural and consistent with current notebook outputs. Right now, we hide the prompt area in that output area because it's rather annoying when nesting output widgets. However, if we can come up with a good UI (perhaps a very narrow area to the right of the output widget?), I think that would be better than programmatic control. |
I would really like to also have some programmatic control. The big difference wrt. top-level output areas is that their initial scroll state is stored in the ipynb file. Hence, I would suggest sth. like |
Hey, there; I'm an aspiring contributor and I'd like to take a shot at tackling this issue. Cheers Eric |
Any headway on this issue? |
is there a fix to this? the output widget still gets the scroll bar when its content gets large. |
If you're trying to display html in your Output, you could wrap the content into a
|
I'm using this to disable all auto scroll bars on the whole page. Im sure you could combine this with some JS to find nearest element so it would only apply to a single output.
|
I edited @evanreichard snippet to disable scrolling only for all output widgets:
|
And what if it is not an HTML ouput? I'm trying to display a long output with print() and am getting a scroll bar that I would like to avoid.... thanks! |
Your solution works perfect. I think your code should be in the default Jupyter Notebook initialization code base because user can still toggle the output widget scroll behaviour by clicking the left region to the output widget. The existing Jupyter notebook code toggles between a slightly longer scroll and slightly shorter scroll, that is meaningless. |
Thank you all for looking at this, it saved me a lot of trouble
|
Is there a way to disable horizontal scrolling of any output from widgets? This code works great for preventing a vertical scrollbar from appearing but I also don't want any horizontal scrollbar showing up. My widgets outputs are not nearly as wide as the entire screen (I am using Google Colab by the way) and yet a scrollbar always appears... I have set widget widths via Layout(), specified overflow="visible" via style(), and even tried adding a width="auto !important" to the above code snippet but no luck. |
I'm using the Output widget to display lengthy content. At some point the auto-scrolling of the output-area kicks in. It would be great if there were a simple way to disable scrolling e.g.
Output(scroll=False)
The text was updated successfully, but these errors were encountered: