Skip to content

FPortal semantic nodes persist in accessibility tree after visual close #854

Open

Description

@divan

Describe the bug
When interacting with FDateField or other popover-based components, automated testing tools like Maestro Studio experience a severe coordinate shift where widgets appear squashed or incorrectly positioned (often in the top-left corner). While the app remains visually perfect on the device, the testing framework's "view" of the app becomes corrupted the moment a popover closes and, crucially, remains broken. This prevents any further interaction and testing.

Here is the minimal reproducible example app:

pubspec.yaml

name: forui_repro
environment:
  sdk: '>=3.0.0 <4.0.0'
dependencies:
  flutter:
    sdk: flutter
  forui: 0.18.1

main.dart

import 'package:flutter/material.dart';
import 'package:forui/forui.dart';

void main() => runApp(const App());

class App extends StatelessWidget {
  const App({super.key});
  @override
  Widget build(BuildContext context) => MaterialApp(
        home: FScaffold(
          child: Center(
            child: const SizedBox(
                width: 300, child: FDateField(label: Text('Inline Dates'))),
          ),
        ),
      );
}

To Reproduce
While issue is not limited to maestro, in order to visually "see" the bug, we need to use maestro studio (desktop app that will connect to Xcode/android simulators).

Steps to reproduce the behavior:

  1. Install Maestro Studio
  2. Launch iPad simulator (haven't tested on android, should be reproducible though)
  3. Launch the app in simulator (flutter run -d )
  4. Connect to simulator in Maestro studio, and click top-left button on the ipad screen streaming window to enable "Inspect mode" to observe bounding boxes

Here is example of Maestro Studio and simulator side-by-side before clicking a date field (not red bounding boxes around accessible widgets)

Image

After clicking date field:

Image

After clicking outside of the field (to dismiss popup):

Image

At this point, if we use maestro tests, and click on the semantic label ("Inline Dates" in this code), the actual click will occur in a coordinate system depicted with red boxes - which doesn't match actual coordinates.

Expected behavior
Semantic nodes coordinates match actual coordinates.

Device (please complete the following information):
Flutter 3.41.1 • channel stable • ssh://[email protected]/flutter/flutter.git
Framework • revision 582a0e7c55 (6 days ago) • 2026-02-12 17:12:32 -0800
Engine • hash cc8e596aa65130a0678cc59613ed1c5125184db4 (revision 3452d735bd) (8 days ago) • 2026-02-09
22:03:17.000Z
Tools • Dart 3.11.0 • DevTools 2.54.1

  • Forui version: 0.18.1
  • Device: iPad simulator
  • OS: iOS 26.2

Screen recording:

Screen.Recording.2026-02-18.at.17.58.08.mov

Activity

  1. self-assigned this
    on Feb 19, 2026
  2. Pante commented on Feb 19, 2026

    @Pante
    Member

    I've looked further into the issue and I believe it's a bug with Flutter itself. Haven't pinpoint the root cause but it seems that explicitly updating a CompositedTransformTarget's child prevents the issue from occurring.

    MVE: https://gist.github.com/Pante/d7b2d1755802bafab022180d6a373063

    Semantics visualization using Maestro Studio, same results can be observed using XCode's accessibility inspector:

    Screen_Recording_2026-02-19_at_5.38.51_PM.mov
  3. moved this from Triage to Icebox in Forui Roadmapon Feb 19, 2026
  4. divan commented on Feb 19, 2026

    @divan
    Author

    Thanks for quick response. Is there any workaround at this moment? (I'm ok to use my fork of Flutter at this moment)

  5. divan commented on Feb 19, 2026

    @divan
    Author

    I've found this Flutter commit to be a likely culprit: flutter/flutter@fccfa97

    Test with pre and post commit versions of Flutter and can see that problem is gone with pre-commit version.

    To test:

    pre-commit version of flutter in a worktree

    cd ~/src/flutter
    git worktree add ~/src/flutter_pre_fcc "fccfa978a97633800aff123b776937d28262c04f^"
    export PATH=~/src/flutter_pre_fcc/bin:$PATH
    hash -r
    flutter --version
    

    post-commit version of flutter in a worktree

    cd ~/src/flutter
    git worktree add ~/src/flutter_pre_fcc "fccfa978a97633800aff123b776937d28262c04f"
    export PATH=~/src/flutter_post_fcc/bin:$PATH
    hash -r
    flutter --version
    

    forui's 0.18.1 sdk constraints should be changed to work with these:

    diff --git a/pubspec.yaml b/pubspec.yaml
    index 0d0b68d..1708b37 100644
    --- a/pubspec.yaml
    +++ b/pubspec.yaml
    @@ -13,7 +13,7 @@ topics:
       - widget
    
     environment:
    -  sdk: ">=3.11.0 <4.0.0"
    +  sdk: ">=3.11.0-0 <4.0.0"
       flutter: ">=3.41.0"
     resolution: workspace
     workspace:

    I'm testing it with a bit more complex MVE:

    pre-commit version:

    Screen.Recording.2026-02-19.at.12.14.37.mov

    post-commit version

    Screen.Recording.2026-02-19.at.12.16.41.mov
  6. added and removed
    priority: highRequires urgent attention, i.e. those that block progress of other features
    on Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions