Skip to content

Commit

Permalink
enableUserInteractionTracing sometimes finds the wrong widget
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Jan 4, 2023
1 parent 9928a74 commit 0080784
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixes

- enableUserInteractionTracing sometimes finds the wrong widget ([#1172](https://github.com/getsentry/sentry-dart/pull/1172))

### Dependencies

- Bump Android SDK from v6.9.2 to v6.11.0 ([#1194](https://github.com/getsentry/sentry-dart/pull/1194), [#1209](https://github.com/getsentry/sentry-dart/pull/1209))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:meta/meta.dart';

import '../../sentry_flutter.dart';
Expand Down Expand Up @@ -257,6 +258,14 @@ class _SentryUserInteractionWidgetState
if (renderObject == null) {
return;
}
if (renderObject is RenderPointerListener) {
final hitResult = BoxHitTestResult();

// Returns false if the hit can continue to other objects below this one.
if (!renderObject.hitTest(hitResult, position: position)) {
return;
}
}

final transform = renderObject.getTransformTo(rootElement.renderObject);
final paintBounds =
Expand Down

0 comments on commit 0080784

Please sign in to comment.