ListSelect stops calling ValueChangeListeners after...

I have a single-select ListSelect component with “Add…” and “Edit…” buttons next to it. I add a ValueChangeListener to be called whenever the selection changes.

Initial condition: The ListSelect is initially empty. When the user picks something somewhere, ListSelect.removeAllItems() is called, followed by ListSelect.addItems() with a list that has a single item in it. The list shows it correctly.

I click on “Add…” to bring up a dialog with fields to let me create a new item. When the user hits in the dialog, I do a ListSelect.addItem(myNewItem). The list now shows two items. Good.

I now select the first item in the list (my ValueChangeListener gets called and prints the selected item to stderr) and select the “Edit…” button. Once again my dialog shows up, properly filled in. I change something and hit . At this point, I call ListSelect.markAsDirty() so that the change gets reflected in the ListSelect. It does. Good.

Now, I click on the second item in the list - and my ValueChangeListener is called.
Then I click on the first item in the list, an my ValueChangeListener is
not called
. From that point it doesn’t matter whether I hit the first or second item :frowning:

Anyone have a clue what might be wrong or how to fix it? Could this be a bug in ListSelect (I didn’t see anything google’ing). I’m running Vaadin 7.7.6. I see this behavior on both Chrome and IE in Windows 10.

Thanks in advance for any help.
Tom

Update: I actually found a couple bugs that seem related:
https://github.com/vaadin/framework/issues/7684
and
https://github.com/vaadin/framework/issues/7682