JPro-one / JPro

The right place to report about bugs or suggest improvements for JPro.
https://www.jpro.one
9 stars 4 forks source link

Explicitly set cursors are not shown #99

Closed mipastgt closed 3 years ago

mipastgt commented 3 years ago

In my code I have something like a split pane. When the user moves the mouse over the sensitive area the mouse cursor should change to a H_RESIZE or V_RESIZE cursor. This does not work with JPro. The program functions correctly and via logging I can clearly see that the setCursor() method of Node gets called correctly too. Just the cursor image does not change.

setCursor: V_RESIZE
setCursor: null
setCursor: V_RESIZE
setCursor: null
setCursor: V_RESIZE
setCursor: null

Is explicitly setting the cursor in code not supported yet?

FlorianKirmaier commented 3 years ago

No, settings the cursor is supported. Technically JPro can't even distinguish whether the cursor is set by CSS or by code. I will test it now.

FlorianKirmaier commented 3 years ago

On a quick test, all CursorTypes listed at https://openjfx.io/javadoc/11/javafx.graphics/javafx/scene/Cursor.html are supported. I've also tested various browsers - safari, chrome, firefox, edge, they all seem to work. Which browser / os did you use? JPro currently set's the cursor-flag for the dom-nodes created by JPro. In rare cases, this hovering might be triggered at different positions (which might be browser dependent).

mipastgt commented 3 years ago

I use the latest version of Chrome on macOS.

mipastgt commented 3 years ago

I just modified my layout a little bit and made the sensitive gap a little bit wider and now, by magic, it works. It seems the browser is more sensitive than native FX which seems a bit strange to me but I can live with that. If you want to you can close this issue.