Skip to content

PlatformView prevents widgets behind it from receiving hover events #58616

@mdebbar

Description

@mdebbar

When a PlatformView is placed on top of another widget, say a button, the button won't receive hover events:

Stack(children: <Widget>[
  RaisedButton(
    onPressed() {
      print('onPressed'); // Taps are handled correctly.
    },
    child: Text('Hover or click'),
  ),
  Positioned.fill(child: MyPlatformView(...)),
])

Setting the hitTestBehavior of the PlatformView to PlatformViewHitTestBehavior.transparent didn't help.

Taps and other gestures are received by the button correctly. Hover is the only one that the button isn't receiving.

cc @dkwingsmt

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: mouseIssues related to using a mouse or mouse supporta: platform-viewsEmbedding Android/iOS views in Flutter appsframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions