fix(web): prevent browser context menu over task menus (#1627)

This commit is contained in:
HouKangle authored and GitHub committed 2026-10-30 18:02:02 +08:00
1 parent c0b70d319d
commit 8719166dbf
9 files changed
+420 -1

No files matched your search

@@ -5,6 +5,7 @@ import 'package:shadcn_flutter/shadcn_flutter.dart' as shad;
import '../../domain/task_record.dart';
import '../../../../l10n/l10n.dart';
import '../../../../shared/widgets/browser_context_menu_region.dart';
import '../../../../util/util.dart';
class TaskContextActions {
@@ -50,7 +51,7 @@ class TaskContextMenu extends StatelessWidget {
@override
Widget build(BuildContext context) {
return shad.ContextMenu(
final menu = shad.ContextMenu(
items: [
shad.MenuButton(
key: const ValueKey('task-context-select-all'),
@@ -134,6 +135,7 @@ class TaskContextMenu extends StatelessWidget {
],
child: child,
);
return BrowserContextMenuRegion(child: menu);
}
}