Skip to content

[BUGFIX] Unfocus Chart Editor dropdown after selecting item#7528

Open
VICK-sys wants to merge 2 commits into
FunkinCrew:developfrom
VICK-sys:feature/fix-chart-editor-toolbox-focus
Open

[BUGFIX] Unfocus Chart Editor dropdown after selecting item#7528
VICK-sys wants to merge 2 commits into
FunkinCrew:developfrom
VICK-sys:feature/fix-chart-editor-toolbox-focus

Conversation

@VICK-sys
Copy link
Copy Markdown

@VICK-sys VICK-sys commented May 7, 2026

Linked Issues

Fixes #2956

Description

Fixes the chart editor input lockout that occurred when a HaxeUI toolbox field had focus (blue outline). After interacting with a field, playtesting with the toolbox open,
and reopening the toolbox, the field's focus was auto-restored, and isHaxeUIFocused returning true gated all chart editor input (scroll, note placement, playtest hotkey,
etc.).

The fix: in ChartEditorToolboxHandler.showToolbox and .hideToolbox, directly call IFocusable.focus = false on the currently-focused element via
FocusManager.instance.focus. This bypasses HaxeUI's set_focus(null) API, which has an asymmetric implementation: get_focus walks all root components, but
set_focus(null) only clears _lastFocuses for Screen.instance.topComponent, so focus living on a non-top root (like a dialog) can't be cleared through it.

Screenshots/Videos

Demo.Video.mp4

@github-actions github-actions Bot added status: pending triage Awaiting review. size: huge A huge pull request with more than 500 changes. labels May 7, 2026
@VICK-sys VICK-sys changed the base branch from main to develop May 7, 2026 09:33
@github-actions github-actions Bot added pr: haxe PR modifies game code. pr: documentation PR modifies documentation or README files. pr: github PR modifies GitHub metadata files. and removed status: pending triage Awaiting review. size: huge A huge pull request with more than 500 changes. labels May 7, 2026
@VICK-sys VICK-sys changed the title Feature/fix chart editor toolbox focus fix: Release HaxeUI focus on chart editor toolbox show/hide May 7, 2026
@Hundrec Hundrec added topic: chart editor Related to the operation of the Chart Editor. status: pending triage Awaiting review. size: small A small pull request with 10 or fewer changes. type: minor bug Involves a minor bug or issue. and removed pr: documentation PR modifies documentation or README files. pr: github PR modifies GitHub metadata files. labels May 7, 2026
Copy link
Copy Markdown
Member

@Hundrec Hundrec left a comment

Choose a reason for hiding this comment

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

This bug has bothered me forever!

The PR's behavior is a big improvement, as it allows left clicks to unfocus the dropdown.
However, right clicking and scrolling is still gated until you left click.

The PR would be perfect if you fixed this too!

@Hundrec Hundrec added status: needs revision Cannot be approved because it is awaiting some work by the contributor. and removed status: pending triage Awaiting review. labels May 9, 2026
@Hundrec Hundrec changed the title fix: Release HaxeUI focus on chart editor toolbox show/hide [BUGFIX] Unfocus Chart Editor dropdown after selecting item May 9, 2026
@VICK-sys
Copy link
Copy Markdown
Author

VICK-sys commented May 9, 2026

This bug has bothered me forever!

The PR's behavior is a big improvement, as it allows left clicks to unfocus the dropdown. However, right clicking and scrolling is still gated until you left click.

The PR would be perfect if you fixed this too!

I'm on it

@github-actions github-actions Bot added size: medium A medium pull request with 100 or fewer changes. and removed size: small A small pull request with 10 or fewer changes. labels May 9, 2026
@Hundrec Hundrec added status: pending triage Awaiting review. and removed status: needs revision Cannot be approved because it is awaiting some work by the contributor. labels May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: haxe PR modifies game code. size: medium A medium pull request with 100 or fewer changes. status: pending triage Awaiting review. topic: chart editor Related to the operation of the Chart Editor. type: minor bug Involves a minor bug or issue.

2 participants