-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 drag and drop displays file in Linux WebKit #3686
Comments
I have a repo to reproduce this bug here: https://github.com/makew0rld/wails-issue-3686 You can see the minimal changes I added to trigger it in this commit: makew0rld/wails-issue-3686@6cbbfa9 |
I'd love to know if others are seeing the same thing. Seems like something that would be mentioned on Discord. |
similar/related #3563 |
According to a user on Discord (message) this replacing also happens for them, but can be prevented with I will try this, but even if it works, it would be nice if Wails could automatically set that up once drag and drop is enabled. In my project I only have a need for a backend drop handler in Go, so if Wails did this automatically it would prevent me from having to add a JavaScript handler as well. It would also make behaviours match across platforms, since I assume WebView doesn't do this or you would have known about it. |
It would be good if you could try it by editing the runtime.js and seeing if it's possible to prevent by default. |
I ran into this one earlier today, and I went with the JS Note, you'll need to do
|
Finally had a chance to work on this. I can confirm @mrf345's patch in #3704 worked for me. I moved my @leaanthony is #3704 + my testing acceptable to you as fix to this issue? |
Description
When dragging and dropping a file on to the Window, my
OnFileDrop
handler runs successfully, but the entire GUI is replaced with a view of the file, if the browser supports it. For example all my HTML is replaced with the default browser HTML to display an image (if I dropped in an image file), or for a PDF, etc. This means I can't do anything with the file because all of my UI is gone.To Reproduce
Expected behaviour
The file view does not appear at all.
Screenshots
No response
Attempted Fixes
Setting
DisableWebViewDrop: true
just made drag and drop impossible, and did not fix the problem.System Details
Additional context
I haven't tested to see if this occurs with WebKit on other OSes, like macOS.
The text was updated successfully, but these errors were encountered: