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: defocus input on tap and drawer open #409

Merged
merged 3 commits into from May 26, 2022

Conversation

cswills
Copy link
Collaborator

@cswills cswills commented May 10, 2022

closes #5

changes:

  1. add onDrawerChanged: and onEndDrawerChanged: to home screen Scaffold to defocus input on drawer open
  2. add onTap: to InkWell to defocus input when messages are tapped
  3. wrap home screen Scaffold with GestureDetector to defocus input when tapped in most other areas

lib/screens/home.dart Show resolved Hide resolved
@chungwwei
Copy link
Collaborator

Also happens when you click the people icon.
maybe adding FocusManager.instance.primaryFocus?.unfocus(); will fix that too?

https://github.com/muxable/rtchat/blob/main/lib/screens/home.dart#L212

1 similar comment
@chungwwei
Copy link
Collaborator

Also happens when you click the people icon.
maybe adding FocusManager.instance.primaryFocus?.unfocus(); will fix that too?

https://github.com/muxable/rtchat/blob/main/lib/screens/home.dart#L212

@cswills
Copy link
Collaborator Author

cswills commented May 10, 2022

Also happens when you click the people icon. maybe adding FocusManager.instance.primaryFocus?.unfocus(); will fix that too?

https://github.com/muxable/rtchat/blob/main/lib/screens/home.dart#L212

https://github.com/cswills/rtchat/blob/ae822cfae8e80b4bafda7c0285311e73b7b5d5eb/lib/screens/home.dart#L174-L175
This code defocuses input when the people icon is pressed.

@cswills cswills merged commit 55e50bb into muxable:main May 26, 2022
@cswills cswills deleted the defocus-input branch May 26, 2022 23:44
kevmo314 added a commit that referenced this pull request Jun 3, 2022
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.

[layout] input doesn't defocus
3 participants