[MacOS] Cannot scroll when hovering on a link
Closed this issue · 2 comments
letrungdo commented
When I use linkWidgetBuilder, when scrolling with the trackpad, I cannot scroll if I am hovering over the link
espresso3389 commented
I'm just updating README.me (438eb42) and sample to use the following code for links:
linkWidgetBuilder: (context, link, size) => GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () async {
if (link.url != null) {
navigateToUrl(link.url!);
} else if (link.dest != null) {
controller.goToDest(link.dest);
}
},
child: IgnorePointer(
child: Container(
color: Colors.blue.withOpacity(0.2),
width: size.width,
height: size.height,
),
),
),
The caveat is, it loses InkWell based tap animation. I don't know how to deal with it without preventing event handling.
letrungdo commented
@espresso3389 Thank you so much!
We can add MouseRegion for show mouse click cursor
MouseRegion(
cursor: SystemMouseCursors.click,
hitTestBehavior: HitTestBehavior.translucent,
)