TF-4064 Fix drag but con not drop on mobile
This commit is contained in:
@@ -299,30 +299,26 @@ class _RecipientComposerWidgetState extends State<RecipientComposerWidget> {
|
||||
},
|
||||
);
|
||||
|
||||
if (PlatformInfo.isWeb || widget.isTestingForWeb) {
|
||||
return DragTarget<DraggableEmailAddress>(
|
||||
builder: (context, candidateData, rejectedData) {
|
||||
return tagEditor;
|
||||
},
|
||||
onAcceptWithDetails: (draggableEmailAddress) =>
|
||||
_handleAcceptDraggableEmailAddressAction(
|
||||
draggableEmailAddress.data,
|
||||
stateSetter,
|
||||
),
|
||||
onLeave: (draggableEmailAddress) {
|
||||
if (_isDragging) {
|
||||
stateSetter(() => _isDragging = false);
|
||||
}
|
||||
},
|
||||
onMove: (details) {
|
||||
if (!_isDragging) {
|
||||
stateSetter(() => _isDragging = true);
|
||||
}
|
||||
},
|
||||
);
|
||||
} else {
|
||||
return tagEditor;
|
||||
}
|
||||
return DragTarget<DraggableEmailAddress>(
|
||||
builder: (context, candidateData, rejectedData) {
|
||||
return tagEditor;
|
||||
},
|
||||
onAcceptWithDetails: (draggableEmailAddress) =>
|
||||
_handleAcceptDraggableEmailAddressAction(
|
||||
draggableEmailAddress.data,
|
||||
stateSetter,
|
||||
),
|
||||
onLeave: (draggableEmailAddress) {
|
||||
if (_isDragging) {
|
||||
stateSetter(() => _isDragging = false);
|
||||
}
|
||||
},
|
||||
onMove: (details) {
|
||||
if (!_isDragging) {
|
||||
stateSetter(() => _isDragging = true);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user