Skip to content

FocusableActionDetector should expose skipTraversal from Focus #187093

Closed

Description

@stan-at-work

FocusableActionDetector is currently missing a skipTraversal parameter, even though it internally uses a Focus widget that supports it.

At the moment, consumers of FocusableActionDetector cannot configure skipTraversal without reimplementing or copying the widget.

Example:

child: Focus(
  focusNode: widget.focusNode,
  autofocus: widget.autofocus,
  descendantsAreFocusable: widget.descendantsAreFocusable,
  descendantsAreTraversable: widget.descendantsAreTraversable,
  canRequestFocus: _canRequestFocus,
  onFocusChange: _handleFocusChange,
  includeSemantics: widget.includeFocusSemantics,
  skipTraversal: NO WIDGET.skipTraversal CURRENTLY,
  child: widget.child,
),

Focus already exposes skipTraversal, but FocusableActionDetector does not forward this property.

This becomes problematic for widgets that rely on keyboard navigation or custom traversal policies, because there is currently no way to opt in/out of traversal behavior while still using FocusableActionDetector.

Suggested solution:

Expose skipTraversal directly on FocusableActionDetector and forward it to the internal Focus widget.

Example:

const FocusableActionDetector({
  super.key,
  this.enabled = true,
  this.focusNode,
  this.autofocus = false,
  this.descendantsAreFocusable = true,
  this.descendantsAreTraversable = true,
  this.skipTraversal,
  ...
});

final bool? skipTraversal;

And:

skipTraversal: widget.skipTraversal,

This would make FocusableActionDetector feature-complete relative to the underlying Focus widget and avoid requiring custom copies of framework code for a common focus configuration use case.


See the docs for more info.
And this

Activity

  1. added
    in triagePresently being triaged by the triage team
    frameworkflutter/packages/flutter repository. See also f: labels.
    f: focusFocus traversal, gaining or losing focus
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on May 27, 2026
  2. mbcorona commented on May 27, 2026

    @mbcorona
    Member

    Thanks for reporting @stan-at-work , routing as proposal to the framework team.

  3. added a commit that references this issue on Aug 28, 2026
    20a16d3
  4. added a commit that references this issue on Sep 3, 2026
    c999d99
  5. github-actions commented on Sep 17, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  6. locked as resolved and limited conversation to collaborators on Sep 17, 2026
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

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterf: focusFocus traversal, gaining or losing focusframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions