Skip to content

Conversation

@SocraticSauropod
Copy link
Contributor

Before this change, clicking the "cancel" button after selecting a file in the Web form rfd creates will still cause pick_file().await to return a file successfully. I believe this is a UX bug, as a user that clicks a "cancel" button would expect that their input will be discarded.

So, this clears the contents of the file input element when cancelling, which makes the later access to its .files property return an empty list, making pick_file().await return None like you'd expect.

Before this change, clicking the "cancel" button after selecting a file
in the Web form rfd creates will still cause `pick_file().await` to
return a file successfully. I believe this is a UX bug, as a user that
clicks a "cancel" button would expect that their input will be
discarded.

So, this clears the contents of the file input element when cancelling,
which makes the later access to its `.files` property return an empty
list, making `pick_file().await` return `None` like you'd expect.
@PolyMeilex PolyMeilex merged commit 7004630 into PolyMeilex:master Sep 4, 2025
12 of 13 checks passed
@PolyMeilex
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants