Skip to content

[General]: Focus behaviour navigating using tab on conditional fields #1290

Closed
@marcosgcd

Description

@marcosgcd

Is there an existing issue for this?

  • I have searched the existing issues

Package/Plugin version

9.1.0

Platforms

  • Android
    iOS
    Linux
    MacOS
    Web
    Windows

Flutter doctor

Flutter doctor
[✓] Flutter (Channel stable, 3.13.1, on macOS 13.4.1 22F770820d darwin-arm64, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.81.1)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!

Minimal code example

Code sample

Current Behavior

When conditional rendering a FormField it messes up Somehow the order of the tab navigation. See video and forked repo.

Age2 should focus to Age3 but Appointment Time gets focused instead

Expected Behavior

The correct widget should be focused when navigating with tab

Steps To Reproduce

  1. Get forked repo
  2. See Video for detailed reproduction

Aditional information

Bildschirmaufnahme.2023-08-30.um.18.15.24.mov

Activity

marcosgcd

marcosgcd commented on Aug 30, 2023

@marcosgcd
Author

Seams to be a Flutter issue and not FormBuilder. I replaced FormBuilderTextField with TextField and the issue still persists.

marcosgcd

marcosgcd commented on Aug 30, 2023

@marcosgcd
Author

If I only use TextFields and nothing else it works fine. So maybe it is show how related to the FormBuilder widgets?

khirsig

khirsig commented on Sep 20, 2023

@khirsig

We are trying to solve similar problems.
Please join our discussion at #1297 regarding this topic.

changed the title [-][General]: Strange Focus behaviour navigating using tab[/-] [+][General]: Focus behaviour navigating using tab on conditional fields[/+] on Jan 1, 2025
linked a pull request that will close this issuefeat: #1297 Improve focus behavior #1453on Jan 5, 2025
deandreamatias

deandreamatias commented on Jan 6, 2025

@deandreamatias
Collaborator

@marcosgcd please take a look if the prerelease version 10.0.0-dev.1 solve this
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @deandreamatias@khirsig@marcosgcd

      Issue actions

        [General]: Focus behaviour navigating using tab on conditional fields · Issue #1290 · flutter-form-builder-ecosystem/flutter_form_builder