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

[Bug] TextInputAction.next doesn't work properly #594

Closed
azeunkn0wn opened this issue Jul 16, 2024 · 1 comment
Closed

[Bug] TextInputAction.next doesn't work properly #594

azeunkn0wn opened this issue Jul 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@azeunkn0wn
Copy link

Steps to reproduce

  1. Tap on first textfield
  2. press Enter (next, focus on typeAhead field)
  3. press Enter (next, focus on last text field)

Expected results

should focus to the next textfield on pressing enter/next button on keyboard

Actual results

the suggestion box is preventing the app to focus to the next textfield.

Cases:

When suggestion direction is up:

  • changing focus from 1st text field to typeAhead field is blocked by suggestion box, even if the suggestion box is not visible.
  • changing from typeAhead field to the last text field is working

When suggestion direction is down:

  • changing focus from 1st text field to typeAhead is working.
  • changing from typeAhead field to the last text field is blocked by suggestion box.

Package Version

5.2.0

Platform

Android, iOS

Code sample

Code sample
Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const TextField(
              textInputAction: TextInputAction.next,
            ),
            TypeAheadField(
              itemBuilder: (BuildContext context, value) {
                return Text(value.toString());
              },
              onSelected: (_) {},
              suggestionsCallback: (search) {
                return [
                  'item1',
                  'item2',
                ];
              },
              autoFlipDirection: true,
              autoFlipMinHeight: 1000,
              builder: (context, controller, focusNode) {
                return TextField(
                  focusNode: focusNode,
                  textInputAction: TextInputAction.next,
                );
              },
            ),
            const TextField(
              textInputAction: TextInputAction.next,
            ),
          ],
        ),

Logs

No response

Screenshots or Video

No response

@azeunkn0wn azeunkn0wn added the bug Something isn't working label Jul 16, 2024
@clragon
Copy link
Collaborator

clragon commented Aug 16, 2024

Thank you for your issue.
For resolution, please track #579 instead, where the focus system of the package is being discussed and rewritten.

@clragon clragon closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants