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

Drag and Drop indicator remains visible after drag cancel with Escape key

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u60
    • javafx

      FULL PRODUCT VERSION :
      java version "1.8.0_60"
      Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
      Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.3.9600]

      A DESCRIPTION OF THE PROBLEM :
      Given JavaFX application with two windows.
      Make second window capable of accepting drag and drop.
      Add cancel button that closes this window to it.
      Start application, select second window (set it active with mouse).
      Start dragging files from explorer (second window must be focused).
      Drag files over second window.
      Press Escape key to cancel drag and drop and close second window.
      Drag and drop indicator remains visible.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Run test case application.
      2) Select child window (small window with button).
      3) Start dragging any file from explorer folder.
      4) Drag file over child window.
      5) Press escape.

      If in step 3 child window is not focused, drag is canceled properly and window remains open. Make sure that window is focused in step 3.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Child window closed, drag cancelled.
      ACTUAL -
      Child window closed. Drag icon remains visible.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class DragAndDropTestApp extends Application {
          @Override
          public void start(final Stage stage) throws Exception {
              stage.show();

              Stage child = new Stage();

              final Button button = new Button();
              button.setCancelButton(true);
              button.setOnAction(event -> child.close());

              final Scene scene = new Scene(button);
              scene.setOnDragOver((drag) -> {
                  drag.acceptTransferModes(TransferMode.LINK);
              });
              child.setScene(scene);
              child.showAndWait();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }
      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: