Skip to content

Tooltip erroneously disappears when both selection handles are out of view, and erroneously stays visible when one selection handle is in view #105804

@antholeole

Description

@antholeole

Tooltip erroneously disappears when both selection handles are out of view, and erroneously stays visible when one selection handle is in view.

Steps to Reproduce

  1. create a text field
  2. highlight enough words to fill the whole text field.
  3. Scroll until the tooltip is out of the region but one handle is out of view
  4. Scroll until both handles are out of view, but the tooltip is still in view.
class MyApp extends StatelessWidget {
  final textController =
      TextEditingController(text: lorem(words: 100, paragraphs: 4));

  MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
          body: Center(
              child: FractionallySizedBox(
        widthFactor: 0.4,
        child: TextField(
          controller: textController,
        ),
      ))),
    );
  }
}

Expected results:

on step 3: On iOS, it actually seems like when any scrolling is done with the tooltip up, the tooltip closes, regardless of if the region is still in the screen.
on step 4: the tooltip should stay up.

Actual results:

on step 3: the tooltip stays up.
tooltip-oob

on step 4: the tooltip goes away.
tooltip-ib

Part of an ongoing fix here: #105799 - just logging this issue for posterities sake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.found in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions