hunk.code_window:     // When the target is editable, dropping is already allowed by
       // default, and calling `preventDefault` hides the cursor.
       const node = editor.findNode(event.target)
       if (editor.isVoid(node)) {
         event.preventDefault()
       }
       // COMPAT: IE won't call onDrop on contentEditables unless the
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit:     if (!node || editor.isVoid(node)) {
  
hunk.file_path: packages/slate-react/src/plugins/dom/before.js
hunk.type: replace
file: import pick from 'lodash/pick'
  import Annotation from '../models/annotation'
  import Value from '../models/value'
  
  /**
   * Commands.
   *
   * @type {Object}
   */
  
  const Commands = {}
  
  /**
   * Set `properties` on the value.
   *
   * @param {Editor} editor
   * @param {Object|Value} properties
   */
  
  Commands.setData = (editor, data = {}) => {
    const { value } = editor
    const newProperties = Value.createProperties({ data })
    const prevProperties = pick(value, Object.keys(newProperties))
  
    editor.applyOperation({
      type: 'set_value',
      properties: prevProperties,
      newProperties,
    })
  }
  
  Commands.addAnnotation = (editor, annotation) => {
    annotation = Annotation.create(annotation)
  
    editor.applyOperation({
      type: 'add_annotation',
      annotation,
    })
  }
  
  Commands.removeAnnotation = (editor, annotation) => {
    annotation = Annotation.create(annotation)
  
    editor.applyOperation({
      type: 'remove_annotation',
      annotation,
    })
  }
  
  Commands.setAnnotation = (editor, annotation, newProperties) => {
    annotation = Annotation.create(annotation)
    newProperties = Annotation.createProperties(newProperties)
  
    editor.applyOperation({
      type: 'set_annotation',
      properties: annotation,
      newProperties,
    })
  }
  
  /**
   * Export.
   *
   * @type {Object}
   */
  
  export default Commands
  