0

I'm using this java SimpleSwingBrowser example to display a html dropdown box like this with the javaFx webEngine:

<html><body><select>
    <option value="1">value 1</option>
    <option value="2">value 2</option>
    <option value="3">value 3</option>
</select></body></html>

You can find a complete example here.

When I run this example, I'm not able to choose a value from the dropdown menu with the mouse (it works if I use the keyboard).

It appears that the mouse events do not make it through to the jfx scene. Is it possible to display a dropdown menu that reacts in the usual way to mouse events?

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
  • Do other HMTL components work? I.e., if you place a ` – Nikos Paraskevopoulos Apr 29 '14 at 16:37
  • Other HTML components are not affected. It seems that the pop-up that contains the list of options (which appears after a click on the element) doesn't get the mouesover or mouseclick events. Maybe the problem is similar to the one described in this question: [https://stackoverflow.com/questions/18969367/html-textarea-doesnt-recognize-the-enter-key-as-newline-in-webview]. – user3585504 Apr 30 '14 at 12:18
  • An [mcve](http://stackoverflow.com/help/mcve) with code and complete runtime environment information embedded in the question is preferable to an offsite project download link. – jewelsea Sep 24 '15 at 18:49

1 Answers1

0

This work for me. I always use text inside " ".

I use the same project: SingleSwingBrowser.

<html>
    <body>
        <select>
        <option value="1">"value 1"</option>
        <option value="2">"value 2"</option>
        <option value="3">"value 3"</option>
        </select>
    </body>
</html>
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – André Schild Sep 25 '15 at 06:30
  • Sorry, i'm new, you probably know... I edited description, after test, and i want to know what in my answer is the problem, because it work for me, and i don't know how to answer it, but i want to answer... This post has 1 year, i see just now, probably the user has the question resolved, but if anoter person has the same problem, i think that this can help. Sorry for english, just learning... – Cristhian Guedes Sep 26 '15 at 16:55