Closed matteron closed 6 months ago
Well........ if you attach an oninput listener to the input event the file dialog does show - it's just weird that without the listener we don't show the dialog.
This works:
rsx! { input { r#type: "file", oninput: move |_| {} } }
Is there actually any utility for file inputs on desktop that don't handle the file?
Problem
Using
rsx! { input { r#type: "file" } }
to create a file input correctly inserts the element, but clicking on the input does not open up a file dialog for the user to pick a file.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
A native file dialog opens up and allows the user to select files.
Edit: More Info I should emphasize, I barely understand the codebase yet, but doing some preliminary investigation I seem to have found the problem might be related to the input element not having a
"data-dioxus-id"
attribute assigned to it causing the event to get ignored in the event listener in native.ts line 65 sincegetTargetId
is returning null in this case.Environment:
Questionnaire