diff --git a/lib/features/base/widget/card_with_smart_interaction_overlay_view.dart b/lib/features/base/widget/card_with_smart_interaction_overlay_view.dart index d6f1e95cc..758ceaf8d 100644 --- a/lib/features/base/widget/card_with_smart_interaction_overlay_view.dart +++ b/lib/features/base/widget/card_with_smart_interaction_overlay_view.dart @@ -111,7 +111,6 @@ class _CardWithSmartInteractionOverlayViewState child: SmartInteractionWidget( onRightMouseClickAction: ({RelativeRect? position}) => _togglePopup(), onDoubleClickAction: ({RelativeRect? position}) => _togglePopup(), - onLongPressAction: _togglePopup, onTapAction: _togglePopup, child: widget.child, ), diff --git a/lib/features/base/widget/smart_interaction_widget.dart b/lib/features/base/widget/smart_interaction_widget.dart index cfa930d33..f78736483 100644 --- a/lib/features/base/widget/smart_interaction_widget.dart +++ b/lib/features/base/widget/smart_interaction_widget.dart @@ -7,7 +7,6 @@ import 'package:universal_html/html.dart' as html; typedef OnRightMouseClickAction = void Function({RelativeRect? position}); typedef OnDoubleClickAction = void Function({RelativeRect? position}); -typedef OnLongPressAction = void Function(); typedef OnTapAction = void Function(); class SmartInteractionWidget extends StatefulWidget { @@ -15,7 +14,6 @@ class SmartInteractionWidget extends StatefulWidget { final bool usePosition; final OnRightMouseClickAction onRightMouseClickAction; final OnDoubleClickAction onDoubleClickAction; - final OnLongPressAction onLongPressAction; final OnTapAction onTapAction; const SmartInteractionWidget({ @@ -23,7 +21,6 @@ class SmartInteractionWidget extends StatefulWidget { required this.child, required this.onRightMouseClickAction, required this.onDoubleClickAction, - required this.onLongPressAction, required this.onTapAction, this.usePosition = false, }); @@ -133,8 +130,6 @@ class _SmartInteractionWidgetState extends State { } } - void _handleLongPress() => widget.onLongPressAction(); - void _handleOnTapAction() => widget.onTapAction(); @override @@ -172,7 +167,6 @@ class _SmartInteractionWidgetState extends State { } } else { return GestureDetector( - onLongPress: _handleLongPress, onTap: _handleOnTapAction, child: widget.child, ); diff --git a/lib/features/composer/presentation/widgets/recipient_tag_item_widget.dart b/lib/features/composer/presentation/widgets/recipient_tag_item_widget.dart index 1ddcb9e2d..0f3f1b7c2 100644 --- a/lib/features/composer/presentation/widgets/recipient_tag_item_widget.dart +++ b/lib/features/composer/presentation/widgets/recipient_tag_item_widget.dart @@ -139,24 +139,37 @@ class RecipientTagItemWidget extends StatelessWidget { ); if (PlatformInfo.isWeb || isTestingForWeb) { - tagWidget = Draggable( - data: DraggableEmailAddress( - emailAddress: currentEmailAddress, - filterField: prefix.filterField, - composerId: composerId, - ), - feedback: DraggableRecipientTagWidget( - imagePaths: imagePaths, - emailAddress: currentEmailAddress, - ), - childWhenDragging: DraggableRecipientTagWidget( - imagePaths: imagePaths, - emailAddress: currentEmailAddress, - ), + tagWidget = MouseRegion( + cursor: SystemMouseCursors.grab, child: tagWidget, ); } + tagWidget = Draggable( + data: DraggableEmailAddress( + emailAddress: currentEmailAddress, + filterField: prefix.filterField, + composerId: composerId, + ), + feedback: DraggableRecipientTagWidget( + imagePaths: imagePaths, + emailAddress: currentEmailAddress, + ), + childWhenDragging: PlatformInfo.isMobile + ? Padding( + padding: const EdgeInsets.only(top: 10), + child: DraggableRecipientTagWidget( + imagePaths: imagePaths, + emailAddress: currentEmailAddress, + ), + ) + : DraggableRecipientTagWidget( + imagePaths: imagePaths, + emailAddress: currentEmailAddress, + ), + child: tagWidget, + ); + if ((PlatformInfo.isWeb || isTestingForWeb) && PlatformInfo.isCanvasKit) { tagWidget = Padding( padding: const EdgeInsetsDirectional.only(top: 8),