Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_drop_handler prevent default behaviour on Windows #904

Open
wusyong opened this issue Mar 14, 2023 · 7 comments
Open

file_drop_handler prevent default behaviour on Windows #904

wusyong opened this issue Mar 14, 2023 · 7 comments

Comments

@wusyong
Copy link
Member

wusyong commented Mar 14, 2023

So it turns out file_drop_handler will block default behaviour on Windows no matter what.
But there are some new webview2 API we could use to invoke such behaviour again.

@wusyong wusyong added help wanted Help is requested to fix this issue type: bug status: needs triage This issue or pull request needs to be investigated labels Mar 14, 2023
@wusyong
Copy link
Member Author

wusyong commented Mar 14, 2023

We can edit dragndrop example to return true to test it.

@pewsheen
Copy link
Contributor

Default behavior is blocked on Linux as well.

@wusyong
Copy link
Member Author

wusyong commented Mar 14, 2023

Hmm looks like wry's doc stick to the truth. We just need to update the doc in tauri configuration.

@wusyong wusyong closed this as completed Mar 14, 2023
@wusyong wusyong changed the title Investigate file_drop_handler behaviour on all platforms file_drop_handler prevent default behaviour on Windows Mar 14, 2023
@wusyong wusyong reopened this Mar 14, 2023
@wusyong wusyong added platform: Windows and removed help wanted Help is requested to fix this issue status: needs triage This issue or pull request needs to be investigated labels Mar 14, 2023
@amrbashir
Copy link
Member

@wusyong here is the branch I have setup for windows https://github.com/tauri-apps/wry/tree/drag-drop-webview2. I still can't get files to drop on <input> elements and after passing DragEnter to WebviewController::DragEnter, other DropTarget methods are never called.

I am not sure why this happens to be honest, maybe because we override all children of the window or something and that's why I wanted to wait for MicrosoftEdge/WebView2Feedback#2907 but I honestly have no idea.

@wusyong
Copy link
Member Author

wusyong commented Mar 17, 2023

Upstream issue: MicrosoftEdge/WebView2Feedback#2658
Looks like its not possible to get the event, and implement drop target ourselves will replace the original one for webview2.

@martpie
Copy link

martpie commented Aug 29, 2024

Any news on this? Does WebView2 expose the right APIs as of today and it's just about using them right, or are we just completely stuck still? Can we help in any way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📬Proposal
Development

No branches or pull requests

4 participants