@@ -245,6 +245,7 @@ FocusScope {
245245
246246 InputMethod {
247247 id: inputMethod
248+ anchors.fill: parent
248249 }
249250
250251 Connections {
@@ -258,11 +259,11 @@ FocusScope {
258259 }
259260
260261 onSurfaceDestroyed: {
261− var orphan = !surface.parent;
262262 if (inputMethod.surface == surface) {
263− inputMethod.removeSurface(surface);
263+ inputMethod.surface = null;
264+ surface.parent = null;
264265 }
265− if (orphan) {
266+ if (!surface.parent) {
266267 // there's no one displaying it. delete it right away
267268 surface.release();
268269 }