You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling FilePicker on upper view since Flet 0.6.0.dev1309 results in 2 windows popping up instead of the expected 1. This behavior was not present in version 0.5.2.
Code example to reproduce the issue:
importfletasftdefmain(page: ft.Page):
page.title="Routes Example"file_picker=ft.FilePicker()
page.overlay.append(file_picker)
defroute_change(route):
page.views.clear()
page.views.append(
ft.View(
"/",
[
ft.AppBar(title=ft.Text("Flet app"), bgcolor=ft.colors.SURFACE_VARIANT),
ft.ElevatedButton("Click this will pop up 1 window",
on_click=lambda_: file_picker.pick_files(allow_multiple=True)),
ft.ElevatedButton("Visit Store", on_click=lambda_: page.go("/store")),
],
)
)
ifpage.route=="/store":
page.views.append(
ft.View(
"/store",
[
ft.AppBar(title=ft.Text("Store"), bgcolor=ft.colors.SURFACE_VARIANT),
ft.ElevatedButton("Click this will pop up 2 windows",
on_click=lambda_: file_picker.pick_files(allow_multiple=True)),
ft.ElevatedButton("Go Home", on_click=lambda_: page.go("/")),
],
)
)
page.update()
defview_pop(view):
page.views.pop()
top_view=page.views[-1]
page.go(top_view.route)
page.on_route_change=route_changepage.on_view_pop=view_poppage.go(page.route)
ft.app(target=main)
Describe the results you received:
Describe the results you expected:
The expected behavior is that only 1 window should pop up.
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (pip show flet):
Name: flet
Version: 0.6.0.dev1309
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page:
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: /opt/homebrew/lib/python3.11/site-packages
Requires: flet-core, httpx, oauthlib, packaging, watchdog, websocket-client, websockets
Required-by:
Operating system:
Tested on MacOS and Windows
Additional environment details:
Python 3.11
The text was updated successfully, but these errors were encountered:
Description
Calling FilePicker on upper view since Flet 0.6.0.dev1309 results in 2 windows popping up instead of the expected 1. This behavior was not present in version 0.5.2.
Code example to reproduce the issue:
Describe the results you received:
Describe the results you expected:
The expected behavior is that only 1 window should pop up.
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (
pip show flet
):Operating system:
Tested on MacOS and Windows
Additional environment details:
Python 3.11
The text was updated successfully, but these errors were encountered: