JetBrains / jcef

A simple framework for embedding Chromium-based browsers into Java-based applications.
Other
227 stars 37 forks source link

When css sets cursor, the mouse pointer will blink #15

Open AlanCZ opened 1 year ago

AlanCZ commented 1 year ago

When css sets cursor, the mouse pointer will blink

songyanbo commented 9 months ago

Is there a solution to this problem?

ujpv commented 8 months ago

I tried on MacOS. Don't see blinking. May you pls, provide more details in a bug according to the template. E.g. JBR version, OS, etc An example of CSS is appreciated.

Yuanuo commented 6 months ago

I'm having the same issue and found that listening to onCursorChange fixes this flickering issue (Kotlin code):

        val client = ...
        client.addDisplayHandler(object: CefDisplayHandlerAdapter() {
            override fun onCursorChange(browser: CefBrowser?, cursorType: Int): Boolean {
                browser?.uiComponent?.cursor = java.awt.Cursor.getPredefinedCursor(cursorType);
                return false
            }
        })
        val browser = ...