JDK-8240293 : Drag and Drop functionality is not working in certain use cases in linux platform
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: 8u231
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: x86_64
  • Submitted: 2020-02-28
  • Updated: 2020-03-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8-poolUnresolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
Some of the Drag and Drop test cases fails in Linux platforms. The steps to reproduce are given below for three use cases. Basic analysis reveals that the Drag and Drop functionality breaks from JDK8u231b06 on wards in linux platforms.

Testsuite name: FX WebNodeManual
Product(s) tested: JDK8u251b06(64bit)
OS/architecture: Ubuntu18.04-x64
Reproducible: Always
Reproducible on machine: Evergreen-machine
[If Sometimes] Also reproducible on machine:

Is it a Regression: Yes
(Test with JDK8u251b05-64bit on Ubuntu18.04-x64,the results:failed the same issue as the bug)
(Test with JDK8u251b01-64bit on Ubuntu18.04-x64,the results:failed the same issue as the bug)
(Test with JDK8u232b11-64bit on Ubuntu18.04-x64,the results:failed the same issue as the bug)
(Test with JDK8u231b10-64bit on Ubuntu18.04-x64,the results:failed the same issue as the bug)
(Test with JDK8u231b03-64bit on Ubuntu18.04-x64,the results:passed)
(Test with JDK8u231b01-64bit on Ubuntu18.04-x64,the results:passed)
(Test with JDK8u221b11-64bit on Ubuntu18.04-x64,the results:passed)
[If Regression] Regression introduced in release/build: JDK8u231b06-64bit
(Test with JDK8u231b06-64bit on Ubuntu18.04-x64,the results:failed the same issue as the bug)
(Test with JDK8u231b05-64bit on Ubuntu18.04-x64,the results:passed)

Test result on the last GAed release for this train:Failed
(Test with JDK8u241b07-64bit on Ubuntu18.04-x64,the results:failed the same issue as the bug)
[if Fail] Test result on FCS:Passed
(Test with JDK1.8.0-64bit on Ubuntu18.04-x64,the results:passed)
Is it a platform specific issue: Yes
(Test with JDK8u251b06-64bit on Mac10.14-x64,the results:passed)
(Test with JDK8u251b06-64bit on win8.1-x86,the results:passed)

[If platform specific issue] Is it a new (previously unsupported) OS/browser/mode testing: No
[If new configuration testing] Issue specific to execution mode or OS/browser version: No

Use case 1:
Test name(s): com/sun/fx/webnode/tests/dnd/DragAndDrop.java#eventDrop.html

Steps to reproduce:
1. Install Test build JDK8u251b06 (64bit) and set JAVA_HOME env
2. use test bundle:java-client-8-clean_export_latest.tar.gz and extract to a folder<WS>
3. Install ANT (version:1.9.7) and set ANT_HOME env
4. Change javafx.home path in build.properties file(under the folder <WS>)
5. Go to "open/tests/functional/WebNodeManualdirectory in WS and run command: ant run-manual
6. Run the case:com/sun/fx/webnode/tests/dnd/DragAndDrop.java#eventDrop.html

Instructions:
    1. Wait for the test page to load.
    2. Start dragging the "Drag me!" rectangle. You should be able to drag it.
    3. Drag the rectangle to the drop area.
    4. Drop the rectangle. Drop area color should turn to light green.
The test passes if every step passes.

The actual results:
The rectangle color can not turn to light green when drapping the "Drag me!",refer to eventDrop.png 

Use case 2:
Test name(s): com/sun/fx/webnode/tests/dnd/DragAndDrop.java#cancelDrop.html

Steps to reproduce:
1. Install Test build JDK8u251b06 (64bit) and set JAVA_HOME env
2. use test bundle:java-client-8-clean_export_latest.tar.gz and extract to a folder<WS>
3. Install ANT (version:1.9.7) and set ANT_HOME env
4. Change javafx.home path in build.properties file(under the folder <WS>)
5. Go to "open/tests/functional/WebNodeManualdirectory in WS and run command: ant run-manual
6. Run the case: com/sun/fx/webnode/tests/dnd/DragAndDrop.java#cancelDrop.html

Instructions:
    1. Wait for the test page to load.
    2. Drag the image to drop area 1. Its background should become light green.
    3. Drag the image to drop area 2. Its background should become light green.
    4. Drag the image to drop area 3. Its background should become light green.
The test passes if every step passes.

The actual results:
The drop area background color can not turn to light green when drapping image,refer to cancelDrop.png 

Use case 3:
Test name(s): com/sun/fx/webnode/tests/dnd/DragAndDrop.java#defaultSelection.html

Steps to reproduce:
1. Install Test build JDK8u251b06 (64bit) and set JAVA_HOME env
2. use test bundle:java-client-8-clean_export_latest.tar.gz and extract to a folder<WS>
3. Install ANT (version:1.9.7) and set ANT_HOME env
4. Change javafx.home path in build.properties file(under the folder <WS>)
5. Go to "open/tests/functional/WebNodeManualdirectory in WS and run command: ant run-manual
6. Run the case: com/sun/fx/webnode/tests/dnd/DragAndDrop.java#defaultSelection.html

Instructions:
    1. Wait for the test page to load.
    2. Select the text in purple rectangle.
    3. Start dragging the selected text, you should be able to do that.
    4. Drop the selection into text field. Text field should now contain exactly the same text as was selected.
The test passes if every step passes.

The actual results:
The Text field have not contain the same text as was selected,refer to defaultSelection.png 
Comments
I was running an early version of openjfx14 on OL 7 and Ubuntu 19.04 when I ran the above tests. With the GA version of openjfx14, it works on all three Linux versions. I suspect that this was fixed by JDK-8225571 which was fixed in openjfx14.
11-03-2020

I tried this on the following three flavors of Linux using the GTK 3 library: Oracle Linux 7.7 - FAIL Ubuntu 19.10 - FAIL Ubuntu 16.04 - PASS With GTK 2 it PASSES all of the above Linux versions. So it is likely triggered by something in the newer GTK 3 platform libraries.
11-03-2020

Using the attached test program, I can confirm that this affects the mainline openjfx14 in the same way: it fails with the default GTK3 library and works with GTK 2.
11-03-2020

This appears to be a window-toolkit bug in the GTK3 pipeline. I'll check whether it also fails in the latest openjfx mainline. If it does, I'll add openjfx14 to the affected versions. If not, then we may be missing some backports of recent fixes in the GTK 3 glass platform.
03-03-2020