fix(web): remove blurOnTrigger from migration shortcuts#1564
fix(web): remove blurOnTrigger from migration shortcuts#1564Roshan1299 wants to merge 1 commit intoSwitchbackTech:mainfrom
Conversation
Signed-off-by: Roshan1299 <banisettirosh@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a6c52940e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| ignoreInputs: false, | ||
| blurOnTrigger: true, | ||
| }, |
There was a problem hiding this comment.
Preserve pending title edits before task migration
If the user presses Ctrl+Meta+Arrow* while renaming a task, removing blurOnTrigger here means the input no longer blurs before handleMigrationNavigation calls onMigrateTask. In packages/web/src/views/Day/hooks/tasks/useTaskActions.ts, title edits live only in editingTitle until onInputBlur/Enter commits them, while migrateTask snapshots the task from tasks immediately; that causes the moved task, undo payload, and persisted move to use the stale title and silently drop the in-progress rename. The existing shortcut tests even cover migration while typing, so this path needs to commit the edit before migrating.
Useful? React with 👍 / 👎.
Problem
Migration shortcuts (Ctrl+Cmd+Arrow) in the day view don't work. The shortcuts were registered with
blurOnTrigger: true, which cleareddocument.activeElementbefore the handler calledisFocusedWithinTask(). The focus check always returnedfalse, so migration silently did nothing.Changes
blurOnTriggerfrom the two migration shortcut registrations inuseDayViewShortcuts.tsso the handler can read focus state correctly.Closes #1560