Skip to content
This repository was archived by the owner on Jun 18, 2018. It is now read-only.
This repository was archived by the owner on Jun 18, 2018. It is now read-only.

Edge freezes when a drop target returns null from render() #24

Open
@gaearon

Description

@gaearon

Moved from react-dnd/react-dnd#390:

In MSEdge (and it seems ONLY in MSEdge; other IE versions, Firefox, Chrome, Safari, ... worked fine) the whole UI of our React application stopped responding. No error message, nothing, the page just went dead.

We implemented our DropHere component as such:

import { DropTarget } from 'react-dnd';

class DropHere {
  /* ... code shortened for brevity ... */
 render() {
   const { canDrop } = this.props;
   return canDrop ? <div>drop here</div> : false;
 }
}

export default DropTarget(types, spec, collect)(DropHere);

So that dropzone only appears while dragging. What fixed the problem with frozen UI was to always render the dropzone div and hide it with CSS when nothing is being dragged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions