Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
fix: prevent textfield from having focus when searchbar closed
Browse files Browse the repository at this point in the history
Eliminate unnecessary raster phase that cause jank even when idle
  • Loading branch information
nullxception committed Jun 3, 2023
1 parent 38a0c62 commit 48b329d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/presentation/screens/home/search/search_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ class _SearchField extends HookConsumerWidget {
final server = ref.watch(serverDataStateProvider).getById(session.serverId);

return TextField(
autofocus: true,
autofocus: searchBar.isOpen,
canRequestFocus: searchBar.isOpen,
enableIMEPersonalizedLearning: !imeIncognito,
controller: searchBar.textEditingController,
decoration: InputDecoration(
Expand Down

0 comments on commit 48b329d

Please sign in to comment.