fix: tag drag-n-drop intercepted by files drag-n-drop (#997)
This commit is contained in:
@@ -223,8 +223,13 @@ export const AttachedFilesButton: FunctionComponent<Props> = observer(
|
|||||||
const dragCounter = useRef(0)
|
const dragCounter = useRef(0)
|
||||||
|
|
||||||
const handleDrag = (event: DragEvent) => {
|
const handleDrag = (event: DragEvent) => {
|
||||||
event.preventDefault()
|
if (
|
||||||
event.stopPropagation()
|
event.dataTransfer?.items &&
|
||||||
|
Array.from(event.dataTransfer.items).some((item) => item.kind === 'file')
|
||||||
|
) {
|
||||||
|
event.preventDefault()
|
||||||
|
event.stopPropagation()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDragIn = useCallback(
|
const handleDragIn = useCallback(
|
||||||
|
|||||||
Reference in New Issue
Block a user