Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(replay): focus the comment editor when it opens (#127054)

Paul D'Ambra169c43b91c5c
diff --git a/frontend/src/scenes/session-recordings/player/commenting/PlayerFrameCommentOverlay.tsx b/frontend/src/scenes/session-recordings/player/commenting/PlayerFrameCommentOverlay.tsx
index 5680a711f395..5283e544f5d0 100644
--- a/frontend/src/scenes/session-recordings/player/commenting/PlayerFrameCommentOverlay.tsx
+++ b/frontend/src/scenes/session-recordings/player/commenting/PlayerFrameCommentOverlay.tsx
@@ -57,7 +57,10 @@ export const PlayerCommentModal = (): JSX.Element => {
data-attr="create-recording-comment-input"
onPressCmdEnter={submitRecordingComment}
initialContent={recordingComment.richContent}
- onCreate={setRichContentEditor}
+ onCreate={(editor) => {
+ setRichContentEditor(editor)
+ editor.focus('end')
+ }}
onUpdate={() => {
// it can't be null by now, but TS doesn't know that
if (richContentEditor) {