Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix bug that caused blocks dragged from non-primary flyouts to be misplaced. #8753

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

gonfunko
Copy link
Contributor

@gonfunko gonfunko commented Jan 30, 2025

The basics

The details

Proposed Changes

This PR fixes a bug in v12 that caused blocks dragged from non-primary flyouts (e.g. the trash) to be misaligned relative to the mouse. The block inflater was setting up click handlers with the flyout of the flyout workspace's target workspace (confusing, I know), on the assumption that that was the flyout in which the block was being inflated. This is not true though; the trash's flyout workspace's target workspace is the main workspace, and that workspace's flyout is the main toolbox flyout, not the trash flyout. This indirection was necessary because IFlyout passed in the flyout workspace to inflaters, so the flyout itself had to be derived when needed. This PR changes the interface to instead pass in the flyout itself (which has a getter for its workspace). This would be breaking, but v12 is still in beta.

@gonfunko gonfunko requested a review from a team as a code owner January 30, 2025 21:02
@gonfunko gonfunko requested a review from cpcallen January 30, 2025 21:02
@github-actions github-actions bot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Jan 30, 2025
@gonfunko gonfunko merged commit e6e57dd into google:rc/v12.0.0 Feb 4, 2025
8 checks passed
@gonfunko gonfunko deleted the opposite-flyouts branch February 4, 2025 23:23
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.

3 participants