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

[SWT] FXCanvas: DnD is implemented incorrectly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 10
    • Component/s: javafx
    • Labels:

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: