Skip to content

Paste recording captures keystrokes instead of pasted text content #56

@InDate

Description

@InDate

Problem

When pasting text (Cmd+V/Ctrl+V) during recording, the recording captures the individual keystrokes (e.g., Meta+v) instead of capturing the pasted text content. This makes recordings unreplayable because the paste content is lost.

Solution

  • Add paste event listener to capture clipboard text content directly
  • Remove preceding Meta+v/Ctrl+v keystroke commands when paste is detected
  • Capture element selectors for both paste and keyboard events
  • Normalize newlines for single-line input elements (browsers strip them)
  • Add append mode for consecutive type commands to same element
  • Properly escape special characters in Playwright/Puppeteer exports

Testing

  • Created dedicated paste test page at /tests/paste.html
  • Verified paste recording captures text content
  • Verified consecutive typing after paste appends instead of replacing
  • Verified multi-line paste works in textareas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions