fix: clipboard stuff
This commit is contained in:
parent
683f65dd86
commit
c2f31568f5
2 changed files with 9 additions and 1 deletions
|
@ -27,6 +27,14 @@ export const remote = {
|
|||
|
||||
export const clipboard = {
|
||||
readText: () => '',
|
||||
writeText: text => {
|
||||
var dummy = document.createElement('textarea');
|
||||
document.body.appendChild(dummy);
|
||||
dummy.value = text;
|
||||
dummy.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(dummy);
|
||||
},
|
||||
};
|
||||
export const ipcRenderer = {};
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (claim) {
|
||||
openCopyLinkMenu(convertToShareLink(claim.permanent_url), e);
|
||||
openCopyLinkMenu(convertToShareLink(claim.canonical_url || claim.permanent_url), e);
|
||||
}
|
||||
// @endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue