Skip to content

fix: Fix bug that caused getInitialCandidate() to be called on every drag step#10157

Merged
gonfunko merged 1 commit into
mainfrom
initial-candidate
Jul 17, 2026
Merged

fix: Fix bug that caused getInitialCandidate() to be called on every drag step#10157
gonfunko merged 1 commit into
mainfrom
initial-candidate

Conversation

@gonfunko

Copy link
Copy Markdown
Contributor

The basics

The details

Proposed Changes

This PR fixes a bug that caused BlockDragStrategy.getInitialCandidate() to be called on every single drag step, including for mouse-driven drags. This method is intended to start keyboard drags at or close to an existing focused element on the workspace, and therefore only needs to be called from startDrag for keyboard moves. Instead, it was being called every time drag() was called, regardless of the modality. This method is relatively expensive, and in any case this was just wasted effort.

@gonfunko
gonfunko requested a review from a team as a code owner July 17, 2026 23:01
@gonfunko
gonfunko requested a review from lizschwab July 17, 2026 23:01
@github-actions github-actions Bot added the PR: fix Fixes a bug label Jul 17, 2026
@gonfunko
gonfunko merged commit d02530a into main Jul 17, 2026
9 checks passed
@gonfunko
gonfunko deleted the initial-candidate branch July 17, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants