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

Flutter app doesn't regain focus after it is lost #3131

Open
johnpryan opened this issue Jan 29, 2025 · 4 comments
Open

Flutter app doesn't regain focus after it is lost #3131

johnpryan opened this issue Jan 29, 2025 · 4 comments
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@johnpryan
Copy link
Contributor

It looks like once a Flutter app that handles keyboard shortcuts loses focus, it can't be regained.

Steps to reproduce:

  1. Run this gist
  2. Observe the arrow keys work
  3. Move cursor into Codemirror
  4. Click on the flutter app to regain focus
  5. Observe the arrow keys don't work anymore.
@johnpryan
Copy link
Contributor Author

cc: @csells it would be great to fix this as part of the AI work, since it's common to generate AI snippets that use the arrow keys (e.g. snake game)

@johnpryan johnpryan added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Feb 18, 2025
@csells
Copy link
Collaborator

csells commented Feb 18, 2025

This is not limited to AI -- anyone building anything in DartPad that requires keyboard input beyond a TextField is going to have this problem.

@johnpryan
Copy link
Contributor Author

Yeah, I just don't want the AI blamed when keyboard input isn't working...

@csells
Copy link
Collaborator

csells commented Feb 18, 2025

ha. I think I wrote that in an email when I first discovered this issue. : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants