PopupMenuButton always display a tooltip even if none are defined
Hi,
PopupMenuButton control always display a tooltip, even when "" or None is passed
Can be reproduced with original exemple code :
import flet as ft
def main(page: ft.Page):
def check_item_clicked(e):
e.control.checked = not e.control.checked
page.update()
pb = ft.PopupMenuButton(
items=[
ft.PopupMenuItem(text="Item 1"),
ft.PopupMenuItem(icon=ft.icons.POWER_INPUT, text="Check power"),
ft.PopupMenuItem(
content=ft.Row(
[
ft.Icon(ft.icons.HOURGLASS_TOP_OUTLINED),
ft.Text("Item with a custom content"),
]
),
on_click=lambda _: print("Button with a custom content clicked!"),
),
ft.PopupMenuItem(), # divider
ft.PopupMenuItem(
text="Checked item", checked=False, on_click=check_item_clicked
),
],
)
page.add(pb)
if __name__ == "__main__":
ft.app(target=main)
Hover the buton always display a tooltip with "Show menu", even with a tooltip = None or tooltip = "" specified
Hi, I also noticed that there is no delay at all with the tooltip display (it displays immediately) :not a bug, but not conform to other controls Other control tooltip have a delay (~1 - 2 seconds)
Will take a look.
A pre-release with the fix concerning this issue is now available. Try it and report if you face any further issues or have any questions:
pip install flet --pre