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)
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)
- duplicates
-
JDK-8193301 False assertion(s) inhibits D&D from SWT to FXCanvas more than once
-
- Closed
-