Tooltip remains visible after clicking widgets with help parameter

Hello everyone,

I noticed some unexpected behavior with tooltips displayed using the help parameter.

When a user clicks on the associated widget, the tooltip remains visible until the user clicks somewhere else, rather than disappearing after a fixed amount of time as it does when the user simply hovers over it. This is particularly problematic with interactive widgets such as buttons and page links, as it happens every time the user interacts with the widget. The tooltip then obscures other parts of the interface.

Here is a minimal reproducible example, tested with Streamlit 1.64:

import streamlit as st

st.title("Test", help="Test")
st.button(label="Test", help="Test")
st.page_link("http://www.google.com", label="Test", disabled=True, help="Test")

Is this the expected behavior, or could this be a bug?

Thank you!

Welcome to the community and thanks for your detailed question! :blush: My understanding is that this tooltip “stickiness” when clicking a widget with a help parameter is a known UX quirk in Streamlit. Tooltips are designed to appear on hover and disappear when the mouse leaves, but when you click the widget, the tooltip can remain visible until you click elsewhere, which can obscure other UI elements. This behavior has been reported as problematic, especially for interactive widgets like buttons and links, and is not the intended user experience.

There isn’t an official fix or parameter to control tooltip dismissal timing in the current Streamlit API. Similar issues and feature requests have been discussed, such as adding a tooltip delay or improving tooltip behavior on click, but as of now, this remains an open area for improvement in Streamlit’s frontend logic. You can follow or upvote related issues to help prioritize a fix—see discussions like st.button - add delay to help tooltip and Display issues with help parameter in Streamlit’s st.radio component.

Sources: