diff --git a/ui/analyse/src/study/studyShare.ts b/ui/analyse/src/study/studyShare.ts index b84c2e0846bfb..848ec9b14d38d 100644 --- a/ui/analyse/src/study/studyShare.ts +++ b/ui/analyse/src/study/studyShare.ts @@ -90,7 +90,7 @@ async function writePgnClipboard(url: string): Promise { return navigator.clipboard.writeText(pgn); } else { const clipboardItem = new ClipboardItem({ - 'text/plain': xhrText(url).then(pgn => new Blob([pgn])), + 'text/plain': xhrText(url).then(pgn => new Blob([pgn], { type: 'text/plain' })), }); return navigator.clipboard.write([clipboardItem]); } @@ -169,7 +169,10 @@ export function view(ctrl: StudyShareCtrl): VNode { }; writePgnClipboard(`/study/${studyId}/${ctrl.chapter().id}.pgn`).then( () => iconFeedback(true), - () => iconFeedback(false) + err => { + console.log(err); + iconFeedback(false); + } ); }), },