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: [#8576] Field loses focus after keystroke #9509

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ceciliaavila
Copy link
Collaborator

Description

This PR fixes the issue with the lost focus on the Prompt action's text fields after the first keystroke.
The NodeWrapper component has a condition that evaluates the selected nodes, and tabs to decide if the focus() function should be called. In the re-render of the component, this condition was evaluated as true when it shouldn't, causing an unnecessary re-focus.
We updated the flags used in this condition to call the focus() function only when the tab and the node are selected.

Task Item

Fixes #8576

Screenshots

Here we can see the focus working as expected in the Prompt action after the changes.
image

@coveralls
Copy link

coveralls commented Feb 10, 2023

Coverage Status

coverage: 54.401% (-0.001%) from 54.402%
when pulling b861f0a on southworks/fix/lost-focus-prompt-actions
into bc5cc73 on main.

@tracyboehrer tracyboehrer requested a review from OEvgeny May 16, 2023 16:28
@OEvgeny OEvgeny self-assigned this Jul 12, 2024
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.

Field loses focus after keystroke
4 participants