diff --git a/src/components/compose-button.jsx b/src/components/compose-button.jsx index ceb452c..3587c2f 100644 --- a/src/components/compose-button.jsx +++ b/src/components/compose-button.jsx @@ -11,7 +11,6 @@ export default function ComposeButton() { const newWin = openCompose(); if (!newWin) { - alert('Looks like your browser is blocking popups.'); states.showCompose = true; } } else { diff --git a/src/components/compose.jsx b/src/components/compose.jsx index f5d8a64..18480db 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -607,7 +607,6 @@ function Compose({ }); if (!newWin) { - alert('Looks like your browser is blocking popups.'); return; } diff --git a/src/components/status.jsx b/src/components/status.jsx index 67c94ce..a5ef587 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -44,6 +44,7 @@ import htmlContentLength from '../utils/html-content-length'; import isMastodonLinkMaybe from '../utils/isMastodonLinkMaybe'; import localeMatch from '../utils/locale-match'; import niceDateTime from '../utils/nice-date-time'; +import openCompose from '../utils/open-compose'; import pmem from '../utils/pmem'; import safeBoundingBoxPadding from '../utils/safe-bounding-box-padding'; import shortenNumber from '../utils/shorten-number'; @@ -373,10 +374,17 @@ function Status({ canBoost = true; } - const replyStatus = () => { + const replyStatus = (e) => { if (!sameInstance || !authenticated) { return alert(unauthInteractionErrorMessage); } + // syntheticEvent comes from MenuItem + if (e?.shiftKey || e?.syntheticEvent?.shiftKey) { + const newWin = openCompose({ + replyToStatus: status, + }); + if (newWin) return; + } states.showCompose = { replyToStatus: status, }; @@ -855,7 +863,7 @@ function Status({ ); const hotkeysEnabled = !readOnly && !previewMode; - const rRef = useHotkeys('r', replyStatus, { + const rRef = useHotkeys('r, shift+r', replyStatus, { enabled: hotkeysEnabled, }); const fRef = useHotkeys( diff --git a/src/utils/open-compose.js b/src/utils/open-compose.js index da67711..b819287 100644 --- a/src/utils/open-compose.js +++ b/src/utils/open-compose.js @@ -18,6 +18,8 @@ export default function openCompose(opts) { // } newWin.__COMPOSE__ = opts; + } else { + alert('Looks like your browser is blocking popups.'); } return newWin;