diff --git a/app/menus/menus/help.ts b/app/menus/menus/help.ts index cd679fb8..b49a0e39 100644 --- a/app/menus/menus/help.ts +++ b/app/menus/menus/help.ts @@ -58,7 +58,18 @@ ${JSON.stringify(getPlugins(), null, 2)} `; const issueURL = `https://github.com/zeit/hyper/issues/new?body=${encodeURIComponent(body)}`; - if (issueURL.length > 6144) { + const copyAndSend = () => { + clipboard.writeText(body); + shell.openExternal( + `https://github.com/zeit/hyper/issues/new?body=${encodeURIComponent( + '\n' + )}` + ); + }; + if (!focusedWindow) { + copyAndSend(); + } else if (issueURL.length > 6144) { dialog .showMessageBox(focusedWindow, { message: @@ -69,13 +80,7 @@ ${JSON.stringify(getPlugins(), null, 2)} }) .then((result) => { if (result.response === 0) { - clipboard.writeText(body); - shell.openExternal( - `https://github.com/zeit/hyper/issues/new?body=${encodeURIComponent( - '\n' - )}` - ); + copyAndSend(); } }); } else {