Skip to content

fix: prevent task cancel action from saving edits#142

Merged
AshutoshDash1999 merged 1 commit into
AshutoshDash1999:masterfrom
bhargav-puppala:fix/task-edit-cancel-behavior
Jun 24, 2026
Merged

fix: prevent task cancel action from saving edits#142
AshutoshDash1999 merged 1 commit into
AshutoshDash1999:masterfrom
bhargav-puppala:fix/task-edit-cancel-behavior

Conversation

@bhargav-puppala

Copy link
Copy Markdown
Contributor

Summary

Fixes an issue where clicking the Cancel button while editing a task would still save the modified text.

The root cause was the input's blur handler committing the edit before the Cancel button click handler executed. This change ensures Cancel correctly discards unsaved edits while preserving the existing save behavior.

Closes #141

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor (no behavior change)
  • Chore / tooling
  • UI polish

Screenshots / Screen Recording

N/A

How to Test

  1. Run the project locally.
  2. Create a task in the Tasks section.
  3. Click the Edit button for the task.
  4. Modify the task text.
  5. Click the Cancel (X) button.
  6. Verify that the original task text is restored and the edit is not saved.

Additional verification:

  1. Edit a task and press Enter.
  2. Verify the edited text is saved.
  3. Edit a task and press Escape.
  4. Verify the edit is discarded.
  5. Edit a task and click outside the input field.
  6. Verify the edit is saved.

Checklist

  • I linked the related issue, if one exists.
  • I assigned myself before opening the PR, if required.
  • npm run lint passes.
  • npm run typecheck passes.
  • npm run build succeeds.
  • I reviewed my own changes before requesting review.
  • I did not change unrelated files.
  • I updated documentation if needed.

@AshutoshDash1999 AshutoshDash1999 merged commit dd9e4cb into AshutoshDash1999:master Jun 24, 2026
5 checks passed
@AshutoshDash1999 AshutoshDash1999 added bug Something isn't working level:intermediate Intermediate level PR gssoc:approved labels Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gssoc:approved level:intermediate Intermediate level PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Fix Task Edit Cancel Button Saving Changes Instead of Cancelling

2 participants