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>(
|
||||||
return DragTarget<DraggableEmailAddress>(
|
builder: (context, candidateData, rejectedData) {
|
||||||
builder: (context, candidateData, rejectedData) {
|
return tagEditor;
|
||||||
return tagEditor;
|
},
|
||||||
},
|
onAcceptWithDetails: (draggableEmailAddress) =>
|
||||||
onAcceptWithDetails: (draggableEmailAddress) =>
|
_handleAcceptDraggableEmailAddressAction(
|
||||||
_handleAcceptDraggableEmailAddressAction(
|
draggableEmailAddress.data,
|
||||||
draggableEmailAddress.data,
|
stateSetter,
|
||||||
stateSetter,
|
),
|
||||||
),
|
onLeave: (draggableEmailAddress) {
|
||||||
onLeave: (draggableEmailAddress) {
|
if (_isDragging) {
|
||||||
if (_isDragging) {
|
stateSetter(() => _isDragging = false);
|
||||||
stateSetter(() => _isDragging = false);
|
}
|
||||||
}
|
},
|
||||||
},
|
onMove: (details) {
|
||||||
onMove: (details) {
|
if (!_isDragging) {
|
||||||
if (!_isDragging) {
|
stateSetter(() => _isDragging = true);
|
||||||
stateSetter(() => _isDragging = true);
|
}
|
||||||
}
|
},
|
||||||
},
|
);
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return tagEditor;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user