Skip to content

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

@divan

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://git@github.com/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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
Icebox

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions