Skip to content

move focus hold clearing to top of key up handler - #812

Merged
michielvandergeest merged 2 commits into
lightning-js:devfrom
brava-apps:keyup-callback-error-failure-fix
Oct 22, 2026
Merged

michielvandergeest merged 2 commits into
lightning-js:devfrom
brava-apps:keyup-callback-error-failure-fix

Conversation

@danielbrava

Copy link
Copy Markdown
Contributor

When a callback in the key up handle throws an error the Focus hold state is never reset, which can be a problem.

In this PR I changed to do it in the beginning before doing the callback, so it can not interfere and is alwyas set back to false.

It was the easiest way I could think. Please let me know if this is the good way to do it

@github-actions

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-10-20T20:12:15.527Z

Summary:
passed: 1565 failed: 0 of 1565 tests

@il-sairamg
il-sairamg self-requested a review October 22, 2026 08:47

@il-sairamg il-sairamg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approach looks good to me — resetting Focus.hold before running the callback is the right call, since the key is already released and hold should clear regardless of what the callback does.

LGTM

@michielvandergeest
michielvandergeest changed the base branch from master to dev October 22, 2026 09:30
@michielvandergeest
michielvandergeest merged commit 7a4ce0f into lightning-js:dev Oct 22, 2026
5 checks passed
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.

3 participants