FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

MouseRegion Cursor bug #4947

Open ryanmish opened 3 days ago

ryanmish commented 3 days ago

Can we access your project?

Current Behavior

My MouseRegion cursor settings are not being respected when the Child container has an action assigned to it.

Expected Behavior

The MouseRegion cursor should override the default cursor of an on-tap action.

Steps to Reproduce

  1. Create new page
  2. Add Column
  3. Add Container
  4. Add Text inside container
  5. Add On-Tap Action to the container
  6. Add any action (I used copy to clipboard and navigate to for my demo)
  7. Wrap the container in a mouseregion
  8. Set the Mouse Cursor to Copy
  9. Toggle Opaque (doesn't work either way, though)
  10. Open Run Mode: Click to Copy doesn't work in Test Mode
  11. Hover over container and see issue

Reproducible from Blank

Bug Report Code (Required)

IT4Ci8mB34V2pbxJ7qrcacEw+CQsH1whRY00mNVDa0ggHZPLCol/Ps6kUHFWXeGiTAk7L060mTgxp9bMvt7MA+UqH0irQKpz1c1yUzzxQjutVa3XDYe0e3N9J/lJJVzG0J23vRJSH/VpcmQi2EyQOfO8d3TsJ77BCmsFPM6ICNv+jlmqQ0SLb3kNh1JWeC/v

Visual documentation

https://vid.pinpointinteractive.com/conversations/3ee1bc04-c371-5d73-af16-1069a69b58c4

Environment

- FlutterFlow version: FlutterFlow v5.0.0+ released November 20, 2024
Flutter version is 3.24.2
- Platform: Web
- Browser name and version: Chrome Version 131.0.6778.85 (Official Build) (arm64)
- Operating system and version affected: macOS Monterey 12.6.5

Additional Information

No response

Alezanello commented 3 days ago

Hello!

The behavior you're observing, where the cursor does not change to SystemMouseCursors.copy when hovering over the "Text Content One", is due to how pointer events are prioritized in Flutter.

Specifically, child widgets can intercept pointer events, preventing the MouseRegion cursor from being applied as expected.

This is not a bug but rather an expected behavior based on Flutter's event handling model.