title: JavaFX ignoring drop in drag and drop file onto TextField (Mac OS X)
body: <p>I want text fields to be able to handle a drop of a file from the finder.</p>
  
  <p>This seems to be ignored on Mac OS X using JavaFX 8. I can't see any problems with the code, can you?</p>
  
  <p>Only "Entered!" gets printed. "Dropped!" never gets printed.</p>
  
  <pre><code>...
  txtSource = (TextField)scene.lookup("#txtSource");
  txtSource.setOnDragEntered(this::handleEnter);
  txtSource.setOnDragDropped(this::handleDrop);
  ...
  
  public void handleEnter(DragEvent event) {
      System.out.println("Entered!");
      event.acceptTransferModes(TransferMode.ANY);
      event.consume();
  }
  
  public void handleDrop(DragEvent event) {
      System.out.println("Dropped!");
  
      Dragboard db = event.getDragboard();
      boolean success = false;
      if (db.hasFiles()) {
          File f = db.getFiles().get(0);
          TextField t = (TextField)event.getAcceptingObject();
          t.setText(f.getAbsolutePath());
          success = true;
      }
      /* let the source know whether the string was successfully 
       * transferred and used */
      event.setDropCompleted(success);
      event.consume();
  }
  </code></pre>