Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8087528

[SWT] FXCanvas: DnD is implemented incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 8u20
    • javafx

      FXCanvas' DnD is implemented differently and incorrectly.

      In the HostContainer.createDropTarget, the embeddedScene.createDropTarget() is created at startup and then reused - other implementations do NOT reuse it, because it's assumed to be empty in the beginning (see assert statements in EmbeddedSceneDnD & EmbeddedSceneDT).

      It causes two problems:
      - EmbeddedSceneDnD.onDropTargetReleased sets its fxDropTarget to null. The fxDropTarget is only assigned during initialization, thus the whole EmbeddedSceneDnD becomes invalid after first use (because FXCanvas' HostContainer reuses it)
      - HostContainer's DropTargetListener sets ignoreLeave=true after first acceptance of dropping, causing all dragLeave events of subsequent DnDs to be skipped (again because HostContainer reuses it)

            psadhukhan Prasanta Sadhukhan
            aqdjfx AqD (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: