Skip to content

fix(web): remove blurOnTrigger from migration shortcuts#1564

Open
Roshan1299 wants to merge 1 commit intoSwitchbackTech:mainfrom
Roshan1299:bug/fix-migration-shortcuts-1560
Open

fix(web): remove blurOnTrigger from migration shortcuts#1564
Roshan1299 wants to merge 1 commit intoSwitchbackTech:mainfrom
Roshan1299:bug/fix-migration-shortcuts-1560

Conversation

@Roshan1299
Copy link

Problem

Migration shortcuts (Ctrl+Cmd+Arrow) in the day view don't work. The shortcuts were registered with blurOnTrigger: true, which cleared document.activeElement before the handler called isFocusedWithinTask(). The focus check always returned false, so migration silently did nothing.

Changes

  • Removed blurOnTrigger from the two migration shortcut registrations in useDayViewShortcuts.ts so the handler can read focus state correctly.

Closes #1560

Signed-off-by: Roshan1299 <banisettirosh@gmail.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines 171 to 173
{
ignoreInputs: false,
blurOnTrigger: true,
},

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

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.

Migration shortcuts are not working

1 participant