Leaflet: JavaFX Webview - dragging problem - Leaflet issue?

I had a meeting with a developer, which used JavaFX and Webview to display a Leaflet map. After upgrading to JDK1.8.0_291 (or greater then 291) the map dragging doesn’t work anymore. First I thought it is only a Java problem but it looks like the mouse-events are correctly passed to the html.

We found out

  1. that dragging the map works if we use Leaflet 0.7.7
  2. if we hold down on the zoom control button and then move the pressed mouse to the map, and then release it -> the map is moving / dragging until we click again javafx_control_drag

Have we some JavaFX experts here? I have following questions:

  1. Can you confirm this issue?
  2. Is it possible to debug the Javascript in the WebView?
  3. Is this a JavaFX problem or is this a problem of Leaflet?

I suggest to let this Issue open until 2022 and if no one can confirm this we close it.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

I did a quick check.

The good news is that with the latest master the issue is gone! 😃

Side question: Are there any estimations of when new Leaflet version (based on the latest master) will be out?

In Leaflet 1.7.1. it’s actually this if expression which consequently causes map to not be moved (because PointerEvent.buttons is wrongfully set to 0 by Java FX 17): https://github.com/Leaflet/Leaflet/blob/bd88f73e8ddb90eb945a28bc1de9eb07f7386118/src/dom/DomEvent.Pointer.js#L104

nice catch! I think this should be fixed in JavaFX

Closing this issue as this browser is not in our support target. If anyone has the time to debug this an create a fix that is always welcome.