Skip to content

[BUG] onLinkTap is not called while using SingleChildScrollView #761

@praharshbhatt

Description

@praharshbhatt

Describe the bug:
While using SingleChildScrollView, the onLinkTap callback is not called. the same code, using Html widget works fine.

HTML to reproduce the issue:

SelectableHtml(
  data: menuButton.content ?? "",
  style: {
    "body": Style(
      margin: EdgeInsets.zero,
      color: Theme.of(context).primaryColor,
    ),
  },
  onLinkTap: (link, renderContext, map, element) async {
    if (link != null && link.isNotEmpty) {
      await launch(link);
    }
  },
)

Html widget configuration:
The exact same code from the example

Expected behavior:
the onLinkTap is called

Device details and Flutter/Dart/flutter_html versions:
flutter_html version: ^2.1.0
Flutter: (Channel stable, 2.2.1, on Linux, locale en_US.UTF-8)

A picture of a cute animal
3Q9N (1)

searching for his onLinkTap callback

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions