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

[WebView] No shadow image when using HTML5 draggable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 8, 9
    • javafx
    • web

      Using JDK8b129, no shadow image is displayed when dragging an html5 draggable element regarding its position (top left corner of the parent you have a truncated image).
      It was working with the jfx version embedded in the JDK8b96


      A sample to reproduce :

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.layout.Region;
      import javafx.scene.web.WebEngine;
      import javafx.scene.web.WebView;
      import javafx.stage.Stage;

      public class WebViewSample extends Application {
      private Scene scene;
      MyBrowser myBrowser;

      @Override
      public void start(Stage stage) {
      myBrowser = new MyBrowser();
      scene = new Scene(myBrowser, 600, 400);

      stage.setScene(scene);
      stage.show();
      }

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

      class MyBrowser extends Region {
      WebView webView = new WebView();
      WebEngine webEngine = webView.getEngine();

      public MyBrowser() {
      webEngine.loadContent("<!doctype html><html lang='en'><head><meta charset='utf-8'><title>HTML5 drag image</title></head>"
      + "<body><img alt='move' src=\"https://www.google.com/images/icons/product/chrome-48.png\" draggable='true' title='my Image' /><p>above truncated shadow image when dragging</p>"
      + "<p>below no shadow image when dragging</p><img alt='move' src=\"https://www.google.com/images/icons/product/chrome-48.png\" draggable='true' title='myImage' /></body></html>");
      getChildren().add(webView);
      }
      }

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Imported: