Skip to content

Conversation

@Aarekaz
Copy link
Owner

@Aarekaz Aarekaz commented Jan 28, 2026

Enhanced the "No Delete Mode" in app/page.tsx to be more robust. Previously, it only handled Backspace/Delete keys via keydown, which missed several ways to delete text (e.g., cutting, replacing selection, mobile inputs).

Changes:

  1. Updated handleBeforeInput to listen for native InputEvent types: deleteContentBackward, deleteContentForward.
  2. Added logic to detect and prevent insert* events when a text selection exists (replacing text).
  3. Added an onCut handler to textarea to block cut operations.
  4. Updated the shake animation timeout from 300ms to 400ms to match the CSS animation duration.

PR created automatically by Jules for task 8265703141049236614 started by @Aarekaz

- Handle `beforeinput` events for `deleteContentBackward` and `deleteContentForward` to support mobile/virtual keyboards.
- Prevent text replacement when selecting text and typing (overwriting selection).
- Add `onCut` handler to prevent cutting text.
- Synchronize shake animation duration to 400ms to match CSS.
- Ensure toast notifications appear for all blocked actions.

Co-authored-by: Aarekaz <36888347+Aarekaz@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel
Copy link
Contributor

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
flowwrite Ready Ready Preview, Comment Jan 28, 2026 6:09am

Request Review

@Aarekaz Aarekaz merged commit f263022 into Aarekaz/add-wpm-counter Jan 28, 2026
2 checks passed
@Aarekaz Aarekaz deleted the fix-no-delete-mode-8265703141049236614 branch January 28, 2026 06:10
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