-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Unable to paste images from clipboard with keyboard shortcut #148
Comments
It it an Electron bug, quite known and old. The cause of it is that when content in the clipboard has two types (e.g. HTML= So, until Electron development team won't fix it or Discord if they could somehow handle the different clipboard types and convert them to what they need (e.g. HTML to raw IMG or URL), I doubt I will fix it. And even if the
It does not revert the changes, I believe I couldn't find a way to do this. Maybe I will take a look on that again? |
Ah I see. Thanks for the explanation. Although I wonder why pasting images in the official discord client works if it's an issue with electron. |
Hmm, I guess they are aware of this bug and have a direct access to the clipboard? But if so, maybe there's a way to actually overwrite |
Actually, this seems to be a Discord Web bug, I can even reproduce it in Chromium – it occurs for images copied between different browser engines. My guesses are it won't work as well when you would try to copy an image from Chromium and paste it in Discord Web launched in Firefox. And there's a way to actually fetch image from clipboard without any workarounds, both in WebCord and Chromium – just Discord does that the wrong way. I guess they can actually read the clipboard using the Electron So, you should definitely report that to Discord developers, it's not my fault – even when WebCord actually does some weird workarounds that seems to kinda succeed where it should fail. Anyway, I still implemented a better workaround, which actually does not modify the tray content (it preserves all of its types) and still works with Preload:
Main:
See commit c3c8b16 for the actual implementation. |
Great! Thanks for the quick turnaround. Is there any way I can try this locally without having to build from source? |
It will be in the next app release ( |
So I should probably open a new issue for this, but just in case its me who's doing something wrong, I'll ask here first. Running the latest app image gives me the following error
Any ideas? |
For some reason, the entire AppImage seems to be corrupted. IDK how that happened, I've generated the AppImage on my side and it seems to be alright. I feel that might be a bug with |
Im having the exact same issue on flatpak version, unsure if i should create a seperate issue for this
out.mp4 |
I probably won't solve it through. There's a dirty workaround involved to make it functional and it is basically an issue with copying images between the Also flatpaks aren't officially supported yet. Try native package instead to see if the bug is reproducible without sandboxing. |
As a side note, I still don't know why this issue exactly happens and how to exactly test if workaround needs to be applied. But testing on my side, it still works for me on |
Aknowledgements
I have checked that there's no other issue describing the same or
similar problem that I currently have, regardless if it has been
closed or open.
I can confirm that this is not an issue with the Discord website,
but it is a problem specific to the WebCord itself.
I have tried running the build from the
master
branch and it doesnot have any fixes implemented according to my issue.
My issue describes one of the unstable and/or not fully implemented
features.
I have found a workaround to mitigate or temporarily fix this issue
(please write it in Additional context section).
Operating System / Platform
🐧️ Linux
Operating system architecture
x64 (64-bit Intel/AMD)
Electron version
v19.0.1
Application version
v3.2.0
Bug description
I'm unable to paste an image from the clipboard when using the keyboard shortcut(
ctrl
+v
). However, right clicking and choosing "paste" does work.To reproduce:
ctrl
+v
in the text box. Nothing happensctrl
+v
again. Somehow the shortcut works this time.Additional context
Peek.2022-06-20.01-38.mp4
The text was updated successfully, but these errors were encountered: