LayoutManager: Error in resize after calling replaceComponent

Hi,

I have a VerticalSplitLayout containing a grid and a OpenLayers map (using the
OpenLayers 3 addon
).
Now on button press, I want to replace the vertical with a horizontal split layout.
Therefore, I create a new HorizonalSplitLayout and place the grid and map objects into it.
When I now call replaceComponent(verticalSplitLayout, horizontalSplitLayout), the layout in the UI changes correctly, the grid is displayed in the horizontal layout correctly, but the map is not displayed anymore, instead I only see a white screen.

At the same time, the JavaScript console shows the following:

AppWidgetset-0.js:6962 Wed Sep 14 12:30:45 GMT+200 2016 com.vaadin.client.LayoutManager SEVERE: Error in resize listenercom.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'updateSize' of null at Unknown.$9d(AppWidgetset-0.js) If I just call removeComponent(verticalSplitLayout), the layout is removed, but I can see several errors like this in the javascript console (not sure if relevant for the current issue):

AppWidgetset-0.js:6962 Wed Sep 14 12:37:23 GMT+200 2016 com.vaadin.client.VConsole SEVERE: Widget is still attached to the DOM after the connector (TextFieldConnector (892)) has been unregistered. Widget was removed. Should I do this differently?

Thanks,
Dominic