St.popover() strange behaviour using inside a st.form() component

Good morning everyone,
I implemented inside a popover component a form component to fill up. But, when I click the st.popover() component the form that appears shows his submit button as I’m over it, instead, it isn’t. How to fix it? It is a bug or something strange behind HTML?

Here the piece of code:

with st.popover(":art:", disabled=st.session_state.btnval):
                form_theme_settings = st.form(key="theme_settings")

                form_theme_settings.write("Edit Theme")

                bg_color = form_theme_settings.color_picker(
                    "Backgroud Color",
                    key="Background Color",
                    value=sanitaze_text_to_hex(st.get_option("theme.backgroundColor"))
                )
                text_color = form_theme_settings.color_picker(
                    "Text Color",
                    key="Text Color",
                    value=sanitaze_text_to_hex(st.get_option("theme.textColor"))
                )
                first_bg_color = form_theme_settings.color_picker(
                    "Primary Background Color",
                    key="Primary Background Color",
                    value=st.get_option("theme.primaryColor")
                )
                second_bg_color = form_theme_settings.color_picker(
                    "Secondary Backgroud Color",
                    key="Secondary Background Color",
                    value=st.get_option("theme.secondaryBackgroundColor")
                )
                
                submit_form_clicked = form_theme_settings.form_submit_button(label = "Apply")
                if submit_form_clicked:
                    customize_theme(
                        bg_color,
                        text_color,
                        first_bg_color,
                        second_bg_color
                    )
                    st.rerun()

Here the problem:

1 Like

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