NativeClipboard.SetData related API takes no effect
See original GitHub issueDescribe the bug and how to reproduce Just like the code what I provided below
What code is involved
using (NativeClipboard Clipboard = new NativeClipboard(true))
{
Clipboard.SetText("12333333");
}
//Check system clipboard: No content like "12333333"
Expected behavior Looks like the content did not write down to clipboard
Issue Analytics
- State:
- Created 9 months ago
- Comments:47 (47 by maintainers)
Top Results From Across the Web
Clipboard API and events
The paste action has no effect in a non-editable context, but the paste event fires regardless. The paste event bubbles, is cancelable, ...
Read more >copy to clipboard - not working in FF,Chrome
Internet Explorer seems to work with window.clipboardData.setData instead, but keep in mind that the IE clipboard will only accept 'text' and ' ...
Read more >copy is not successful NotAllowedError: The Clipboard API ...
While testing log copying behaviour in VSCode, I noticed that the copy button is no longer working, when using it in the context...
Read more >Clarification for clipboardData.setData() and native access
Writing to the clipboard currently states: These data types must be placed on the clipboard with a corresponding native type description if ...
Read more >How to use the Synchronous Clipboard API without native ...
As the clipboardData only is available during the event, I rely on Native code to do side effects: Html.div [ Html.Events.onWithOptions "copy" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks great, thanks for your work. The last suggestion is
Design the API like this: NativeClipboard.CreateIDataObjectFromShellItems(params ShellItem[] Items)
if Items.Length == 0, just call NativeClipboard.CreateEmptyIDataObject()
It makes the user easier to use the API if they want to set ShellItems (even they passed an empty array)
I hate loose ends, so today I wrote the following and confirmed that something is wrong with OleSetClipboard.