Property.ValueChangeListener().valueChanged() called on window close

We have found that if we have a popup Window that includes a CKEditorTextField (which we subclass from Widget for the client side and AbstractField for the server side), when we close the window, the Property.ValueChangeListener().valueChanged() method is still being called on the field.

We had not noticed this before because we normally put the field in a Form (in a window) and thus only update our server side when a Save button is pressed, so I guess were just ignoring the fact that the value change had occurred.

If the field is just added to a layout in a popup Window (without a Form), is there any way in the Property.ValueChangeListener.valueChange() callback to know that this change event is taking place as a result of the window being closed? It was a bit surprising since the Window that contains it was closed that it could process this event anyway.

Thanks for any ideas on what we can do to tighten this up.

Or is this just a programming error to assume a value change implies the contents were to be saved?

Does anybody know if this is a Vaadin bug or not?

I did put just a regular Vaadin TextField in and it does the same thing, so it’s not strictly related to the ckeditor field, nor is it related to setImmediate() transfers.

It is interesting that closing the window triggers the client fields to transfer their values to the server.