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 focus on committing values in the form view #7614

Merged
merged 1 commit into from Apr 27, 2023

Conversation

vlaaad
Copy link
Contributor

@vlaaad vlaaad commented Apr 27, 2023

Technical notes:
When editing fields in the game.project it was possible to lose the input focus after committing the value if the value became clearable. This happened because a new node — reset button — was added to the grid pane children, and it caused the re-creation of this and subsequent inputs, so the view lost focus. Using :fx/key stabilized the component description -> JavaFX node mapping, enforcing that the input stays the same object and is not re-created.

User-facing changes:
We don't lose input focus when editing game.project fields.

Fixes #7613

Technical notes:
When editing fields in the `game.project` it was possible to lose the input focus after committing the value if the value became clearable. This happened because a new node — reset button — was added to the grid pane children, and it caused the re-creation of this and subsequent inputs, so the view lost focus. Using `:fx/key` stabilized the component description -> JavaFX node mapping, enforcing that the input stays the same object and is not re-created.

User-facing changes:
We don't lose input focus when editing `game.project` fields.

Fixes #7613
@vlaaad vlaaad requested a review from matgis April 27, 2023 14:41
@vlaaad vlaaad merged commit a57710a into editor-dev Apr 27, 2023
5 checks passed
@vlaaad vlaaad deleted the DEFEDIT-focus-loss-on-commit branch April 27, 2023 18:11
@britzl britzl linked an issue May 8, 2023 that may be closed by this pull request
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.

Improve focus handling when editing game.project
2 participants