Mobile View Scroll Issue in Chat Application
Hi everyone,
I’m relatively new to Streamlit, and I’ve encountered an issue that I haven’t been able to resolve after some searching. When I load my chat application on mobile, the page automatically scrolls to the bottom. Ideally, I want the user to see the title at the top of the page when the app loads, but currently, it immediately jumps to the bottom.
Here’s a simplified version of the code I’m working with:
import streamlit as st
st.title("This is the top of the page")
# Creating multiple columns with buttons
col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11, col12 = st.columns([1]*12, gap="small")
with col1:
a = st.button("A")
with col2:
b = st.button("B")
with col3:
c = st.button("C")
with col4:
d = st.button("D")
with col5:
e = st.button("E")
with col6:
f = st.button("F")
with col7:
g = st.button("G")
with col8:
h = st.button("H")
with col9:
i = st.button("I")
with col10:
j = st.button("J")
with col11:
k = st.button("K")
with col12:
l = st.button("L")
st.markdown("This is the bottom of the page")
user_query = st.chat_input()