Skip to content

Web Focus Lost After Alt+Tab / Window Switch in Exported FlutterFlow Web Build #7192

@Nishant-1703

Description

@Nishant-1703

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

We are facing a web focus regression after publishing/exporting our FlutterFlow project and building it from VS Code.

Previously, when publishing the same project for web, TextFields, Dropdowns, Checkboxes, and other input controls retained focus correctly after the user switched to another application (Alt+Tab) and then returned to the browser.

In the current exported FlutterFlow web build, focus is lost after switching away from the application and returning. The cursor/caret is no longer visible in the previously focused TextField, and users must manually click the field again before continuing input.

This issue affects TextFields, Dropdowns, Checkboxes, and other input widgets throughout the entire application.

Expected Behavior

When a user switches away from the browser window and then returns to the application, the previously focused input control should retain or correctly restore focus so that typing can continue without requiring an additional mouse click.

Steps to Reproduce

  1. Export a FlutterFlow project and build the web application from VS Code.
  2. Open the web application in Chrome.
  3. Click inside any TextField (or interact with a Dropdown/Checkbox).
  4. Switch to another application using Alt+Tab or move focus to another browser window.
  5. Return to the FlutterFlow web application.
  6. Observe that the previously focused control no longer has an active caret/focus state and requires manual re-selection.

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

IT4gz+fluYtIj7wA7qX2Ke9VqCQsKVB5aq00sNobbxAjIoDoPJkUaczRXFJWXe7nTFFpKEWLuEkfzMqKhePpMPY7PT6WfaU5wagNVg7iXmq/aoSmOqWKTkZSTJhTf1DG0aeFpApDLvRiL3tn62C6LumtYDfDO5f7Zwh9f6PHaOI=

Visual documentation

AutoFocus.Issue.mp4

Environment

- Platform: Web
- Browser name and version: Google Chrome

Additional Information

  • The issue occurs globally across the entire project and is not limited to a specific page or widget.
  • The same workflow worked correctly in older FlutterFlow web builds.
  • Chrome DevTools → Rendering → "Emulate a focused page" changes the behavior, suggesting the issue may be related to browser/page focus handling.
  • We attempted both JavaScript-based focus restoration and Flutter FocusNode/requestFocus implementations, but Flutter web does not reliably restore caret/input focus.
  • Because the application contains many pages and input controls, we require a project-level or framework-level solution rather than page-specific workarounds

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageA potential issue that has not been confirmed as a bug.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions