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 = {
|
export const clipboard = {
|
||||||
readText: () => '',
|
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 = {};
|
export const ipcRenderer = {};
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (claim) {
|
if (claim) {
|
||||||
openCopyLinkMenu(convertToShareLink(claim.permanent_url), e);
|
openCopyLinkMenu(convertToShareLink(claim.canonical_url || claim.permanent_url), e);
|
||||||
}
|
}
|
||||||
// @endif
|
// @endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue