You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)
panel>=1.2.2 (it does not happen with previous versions)
Any modern version of Firefox, tested from 99.0 to 121.0; also happens in Safari 17.2.1. But it does not happen in Chrome nor Opera for instance
Description of expected behavior and the observed behavior
For some reason, using a widget that modifies some pane is making the browser's scrollbar go directly to the widget location; changing user's viewport in a Panel app
Complete, minimal, self-contained example code that reproduces the issue
We can create a file called test.py:
importrandomimportpanelaspnpn.extension()
importmatplotlibimportmatplotlib.pyplotasplt# Reactive function for pn.bind:defplot_points(n):
x= [random.uniform(0, 10) foriinrange(n)]
y= [random.uniform(0, 10) foriinrange(n)]
fig=plt.Figure()
ax=fig.add_subplot()
ax.scatter(x, y)
returnpn.pane.Matplotlib(fig,
width=500,
tight=True)
# Widget:selector_n=pn.widgets.IntSlider(start=2, end=100)
# We put both the widget and the chart in a column.# I also include a tall Spacer to make the app tall enough# to be scrollable:app=pn.Column(pn.Spacer(width=300, height=3000, styles={"background":'#BCA600'}),
selector_n,
pn.bind(plot_points, n=selector_n))
app.servable()
Seems very annoying, I indeed was not able to reproduce in Chrome but Firefox and Safari were affected. Investigating with the profiling indicates this happens immediately after the slider is updated and not when the matplotlib plot is redrawn which was what I had expected.
ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)
panel>=1.2.2
(it does not happen with previous versions)99.0
to121.0
; also happens in Safari17.2.1
. But it does not happen in Chrome nor Opera for instanceDescription of expected behavior and the observed behavior
For some reason, using a widget that modifies some pane is making the browser's scrollbar go directly to the widget location; changing user's viewport in a Panel app
Complete, minimal, self-contained example code that reproduces the issue
We can create a file called
test.py
:Which we can run with:
Stack traceback and/or browser JavaScript console output
No warnings nor error tracebacks appear in any web browser's console
Screenshots or screencasts of the bug in action
You can see the weird behavior in the following GIF:
Thank you!
The text was updated successfully, but these errors were encountered: