disabled default drag and drop behaviour

This commit is contained in:
Djeeberjr 2021-08-01 21:42:11 +02:00
parent ead5c0f322
commit 483ffb58ca

View File

@ -9,6 +9,16 @@ const client = new ApolloClient({
cache: new InMemoryCache()
})
// Disable drag and drop behaviour on document
function disable(event: DragEvent) {
event.preventDefault()
event.stopPropagation()
}
document.addEventListener("dragenter",disable)
document.addEventListener("dragleave",disable)
document.addEventListener("dragover",disable)
document.addEventListener("drop",disable)
ReactDOM.render(
<React.StrictMode>
<ApolloProvider client={client}>