Skip to content

[web] tappable plain text semanic nodes receive double mouse clicks #151265

@yjbanov

Description

@yjbanov

Plain text semantic nodes that have a tap action receive double clicks using mouse instead of single clicks.

Internal Google issue: b/350826791

Repro:

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

void main() {
  runApp(const MyApp());
  SemanticsBinding.instance.ensureSemantics();
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Tappable plain text repro',
      theme: ThemeData(useMaterial3: true),
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: const Text('Tappable plain text repro'),
        ),
        body: Center(
          child: GestureDetector(
            onTap: () {
              print('Tap received');
            },
            child: const Text(
              'Click and check the console output',
            ),
          ),
        ),
      ),
    );
  }
}

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: quake (g3)engineflutter/engine related. See also e: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions