sworded
sworded

Reputation: 2499

GWT Listbox dropdown not working

I am unable to get the dropdown feature working for ListBox in Chrome and IE. When I click on the listbox, nothing happens. If I set the number of visible items to 2 or more, then the items display, but are not selectable. Everything works fine in Firefox. Is there a workaround or an alternative?

I am using UIBinder to create the listbox

<g:ListBox ui:field="areaList" />

@UiField
ListBox areaList;

areaList.addItem("Area1");
areaList.addItem("Area2");

The html is:


     <select class="gwt-ListBox">
      <option value="Area1">Area1</option>
      <option value="Area2">Area2</option>
     </select>

The problem seems to be that onmousedown events trigger the display of a dropdown for chrome and IE.


    <body onmousedown="return false;" >

Upvotes: 0

Views: 1845

Answers (1)

Hilbrand Bouwkamp
Hilbrand Bouwkamp

Reputation: 13519

GWT ListBox is just a HTML select, which is very basic functionality and should work without any problem with all browsers. This would suggest that the problem isn't with the ListBox but with something else. But since your question doesn't include any futher details it's impossible to tell what's wrong. So can you add the code your using to create and fill the ListBox and tell if the ListBox select contains any values at all in the browsers it's not working in.

Upvotes: 0

Related Questions