Resizing sidebar scrolls page to the top

Hello everyone! I have noticed resizing the sidebar with your mouse forces scrolling to the top of the page, though the app itself apparently does not get restarted (judging by the ‘app rerun’ prints). Below is a minimum code example demonstrating this issue. Is there a way to prevent this or a workaround? Thank you in advance!

Streamlit version: 1.29.0

import streamlit as st

print('app rerun')

with st.sidebar:
    st.write('Hi')

st.write('hello ' * 1000)

Hi @johndoe

I have tried and adjusting the sidebar width with the mouse does indeed trigger a page scroll to the top. Perhaps you’d like to file a GitHub issues here:

Or, alternatively you’d might want to adjust the sidebar width so that the user would not need to:

Hope this helps!

Hi @dataprofessor, thanks a lot for your reply! Just opened a GitHub issue for this (Resizing sidebar scrolls page to the top · Issue #7830 · streamlit/streamlit · GitHub). Would prefer not to fix the sidebar width, but will keep this option in mind!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.