Allow <input type="file"> without event handlers to open web view file dialog on Desktop (#2134)

* Allowing webview file picker

* cargo fmt
This commit is contained in:
Mattia Schiano authored and GitHub committed 2024-03-24 14:23:29 -07:00
1 parent 6dbedd4e39
commit 266551e7c9
3 files changed
+3 -5

No files matched your search

+1 -3
View File
@@ -73,10 +73,8 @@ export class NativeInterpreter extends JSChannel_ {
bubbles: event.bubbles,
});
this.ipc.postMessage(message);
event.preventDefault();
}
// Prevent default regardless - we don't want file dialogs and we don't want the browser to navigate
event.preventDefault();
}
});