disabled default drag and drop behaviour
This commit is contained in:
parent
ead5c0f322
commit
483ffb58ca
@ -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}>
|
||||
|
Loading…
Reference in New Issue
Block a user