Repository navigation
Mouse cursor doesn't change to pointer when hovering over CupertinoDialogAction on Desktop #169037
Copy link
Copy link
Closed
Labels
a: desktopRunning on desktopRunning on desktopa: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supportfound in release: 3.29Found to occur in 3.29Found to occur in 3.29found in release: 3.33Found to occur in 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packagesr: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issueteam-designOwned by Design Languages teamOwned by Design Languages teamwaiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
Steps to reproduce
- Run sample code on
macOSplatform - Open a dialog using
Click Mebutton - Hover over the dialog action button
- See mouse style has not changed to
pointer(hand)
Expected results
Mouse style should change to pointer when hovering over dialog action button
Actual results
Mouse style doesn't change (remains the same)
Code sample
Code sample
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(home: MyHomePage());
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ElevatedButton(
onPressed: _showDialog,
child: const Text('Click Me'),
),
),
);
}
void _showDialog() {
showAdaptiveDialog(
context: context,
builder: (_) {
return AlertDialog.adaptive(
title: const Text('Adaptive Dialog'),
content: const Text('This is an adaptive dialog.'),
actions: [
CupertinoDialogAction(
onPressed: () => Navigator.of(context).pop(),
child: const Text('OK'),
),
],
);
},
);
}
}
Screenshots or Video
Screenshots / Video demonstration
| macOS | Web |
|---|---|
Screen.Recording.2025-05-17.at.11.45.55.PM.mov |
Screen.Recording.2025-05-17.at.11.47.04.PM.mov |
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.29.3, on macOS 15.5 24F74 darwin-arm64, locale en-IN) [1,456ms]
• Flutter version 3.29.3 on channel stable at /Users/me/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ea121f8859 (5 weeks ago), 2025-04-11 19:10:07 +0000
• Engine revision cf56914b32
• Dart version 3.7.2
• DevTools version 2.42.3
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [2.2s]
• Android SDK at /Users/me/Library/Android/sdk
• Platform android-36, build-tools 36.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [1,966ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16E140
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [13ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.3) [13ms]
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
[✓] VS Code (version 1.100.2) [10ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.110.0
[✓] Connected device (3 available) [6.5s]
• macOS (desktop) • macos • darwin-arm64 • macOS 15.5 24F74 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.5 24F74 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 136.0.7103.114
[✓] Network resources [1,188ms]
• All expected network resources are available.
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: desktopRunning on desktopRunning on desktopa: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supportfound in release: 3.29Found to occur in 3.29Found to occur in 3.29found in release: 3.33Found to occur in 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packagesr: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issueteam-designOwned by Design Languages teamOwned by Design Languages teamwaiting for PR to land (fixed)A fix is in flightA fix is in flight
Activity
tirth-patel-nc commentedon May 18, 2025
Triage Report
I was able to reproduce the issue using the provided code sample on both the
stable (3.29.3)andmaster (3.33.0-1.0.pre.122)channels.Related Issues: #59576, #58192
Code Sample (Same as OP)
stable (3.29.3) - flutter doctor -v
master (3.33.0-1.0.pre.122) - flutter doctor -v
[-]Mouse style doesn't change to `pointer` when overing over CupertinoDialogAction on macOS[/-][+]Mouse style doesn't change to `pointer` when overing over CupertinoDialogAction on Desktop[/+][-]Mouse style doesn't change to `pointer` when overing over CupertinoDialogAction on Desktop[/-][+]Mouse style doesn't change to `pointer` when hovering over CupertinoDialogAction on Desktop[/+][-]Mouse style doesn't change to `pointer` when hovering over CupertinoDialogAction on Desktop[/-][+]Mouse cursor doesn't change to `pointer` when hovering over CupertinoDialogAction on Desktop[/+]dkwingsmt commentedon May 21, 2025
It's expected. On macOS (in general, on desktop) mouse cursors don't change to hand when hovering over buttons, unless it's on a Web page. You can try it on all kinds of system apps (not Chrome).
OutdatedGuy commentedon May 24, 2025
@dkwingsmt does that not apply to the material widgets? Cuz all (probably) material widgets changes cursor style on all desktop platforms.
dkwingsmt commentedon May 24, 2025
@OutdatedGuy Funnily I was a little surprised to know it (even though I added mouse cursor to them myself) and had to check some code to confirm. That being said, I think the design still makes sense since for Material we can not reference the experience on any desktop platforms but tablets, while for Cupertino we were mirroring macOS.
In general setting default mouse cursors were a hard job due to lack of specs and I have to admit that some of them probably was chosen inconsistently. I'm open to different ideas for discussion.
OutdatedGuy commentedon May 25, 2025
@dkwingsmt it makes sense to not change cursor style by default for cupertino widgets as macOS and it's system apps follow that practise. But having a way to change cursor style easily (e.g. with a property value) would be nice to keep UI consistency when using both Material and Cupertino elements.
CupertinoSwitchhas a mouseCursor property, so making all (almost) widgets to have that property would be great for consistency.dkwingsmt commentedon Jun 5, 2025
I agree! Although, the issues you mentioned would be duplicate of #58192. I'm therefore going to close this issue. Please don't hesitate to reopen or file a new issue if you have more questions. And if you're willing to add the
mouseCursorproperty to the widgets, feel free to ask me for review! Thank you!Feat: Add mouse cursor for CupertinoDialogAction (#169051)
github-actions commentedon Jun 19, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Feat: Add mouse cursor for CupertinoDialogAction (flutter#169051)