Skip to content

VPS-95/Fixed issue where pasting into input area would paste in slide#421

Open
kmck133 wants to merge 1 commit into
masterfrom
VPS-95/pasting-bug
Open

VPS-95/Fixed issue where pasting into input area would paste in slide#421
kmck133 wants to merge 1 commit into
masterfrom
VPS-95/pasting-bug

Conversation

@kmck133

@kmck133 kmck133 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Issue

Pasting text into the scene name input field incorrectly pastes into the slide instead.

Solution

Added an isInputTarget guard to the global copy, cut, and paste clipboard handlers so they bail out early when the event target is an INPUT or TEXTAREA element, matching the same guard already in the keydown handler.

Risk

Low. The change only affects clipboard events originating from native input elements, which the global handlers should never have been handling.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed clipboard operations (copy, cut, paste) interfering with form field interactions. Clipboard actions now work correctly when users interact with text input fields without triggering unintended editor behavior.

@linear

linear Bot commented Jun 3, 2026

Copy link
Copy Markdown

VPS-95

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c07d0b29-e563-405a-ab1b-33041102d91f

📥 Commits

Reviewing files that changed from the base of the PR and between 736892a and ad306f9.

📒 Files selected for processing (1)
  • frontend/src/features/authoring/handlers/keyboard/clipboard.ts

📝 Walkthrough

Walkthrough

This PR adds a helper function to detect when clipboard events target form input elements and applies that guard to three clipboard handlers. Copy, cut, and paste handlers now return early if the clipboard event originates from an INPUT or TEXTAREA, preventing editor clipboard logic from interfering with native form field behavior.

Changes

Form Input Clipboard Guard

Layer / File(s) Summary
Clipboard handler guards for form inputs
frontend/src/features/authoring/handlers/keyboard/clipboard.ts
Adds isInputTarget helper that detects INPUT/TEXTAREA targets, then applies it as an early-return guard to copy, cut, and paste handlers to prevent editor clipboard operations when the user interacts with form fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A rabbit hops through clipboard flows,
"Form inputs now," it cheerfully knows,
Guard gates keep the editor at bay,
While text fields dance their native way! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main issue fixed (pasting into input area affecting slide) and directly corresponds to the changeset's primary objective.
Description check ✅ Passed The description includes all required sections (Issue, Solution, Risk) and provides clear, complete information about the problem and fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch VPS-95/pasting-bug

Comment @coderabbitai help to get the list of available commands and usage tips.

@harbassan harbassan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep works, clean implementation, nice 👍 😺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants