From eb127dd3e38bb26854621a8c7923c98ccfe5cf27 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Thu, 18 Apr 2024 19:15:11 +0200 Subject: [PATCH] fix: ignore PointerHover event with trackpad kind (#32) --- lib/src/hover_region.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/hover_region.dart b/lib/src/hover_region.dart index e607bb1..8316d7b 100644 --- a/lib/src/hover_region.dart +++ b/lib/src/hover_region.dart @@ -380,6 +380,10 @@ class _HoverRegionState extends State { // that is never followed by PointerExitEvent. This is a workaround for that. return; } + if (event.kind == PointerDeviceKind.trackpad) { + // Trackpad and magic mouse on macOS. Safe to ignore. + return; + } if (_preventNotifications) { _pendingHover = event; } else {