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
Input prompt loses focus despite clicking into the text box #5625
Comments
@captainsafia , any recommendations on how we might be able to address this issue? |
My first hunch here is to investigate why the previously selected cell steals back focus. It would seem that there is an errant If that isn't the case, then there might be something funky going on with the CSS. |
I looked at the |
Perhaps! In any case, I suspect that this is where the issue lies. Perhaps it makes sense to add an |
Thanks for the suggestion @captainsafia. I am trying to understand your suggestion better. Imagine the following scenario:
Is my understanding correct? This would imply that we start storing focus states of prompt elements in redux and I was wondering if it's possible to avoid that. |
Application or Package Used
nteract desktop,
PromptRequest
componentPython kernel
Describe the bug
Input prompts lose focus even after clicking the text input element.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The input box of Cell A should maintain focus (blinking cursor)
Screenshots
Nteract desktop app
You can note the cursor shifts from the input box back to the editor of the second cell.
We noticed this behavior in our product as well where we directly leverage the
PromptRequest
component to support user inputs.You can note that the input prompt loses focus after the first click. Clicking into the input element again seems to set the cursor in that element.
Additional context
I think this issue surfaces because cell/editor focus states are explicitly managed in nteract as well as in our component. Looking at the redux store schema for prompts, I noticed that we don't maintain the
focus
states of input prompt elements within the state.I wanted to jump start a discussion to understand what are some recommendations to tackle this behavior.
The text was updated successfully, but these errors were encountered: