diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs index 8135c96611f..91800646112 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs @@ -1035,6 +1035,11 @@ internal IntPtr GetPtrfromView() internal void RemoveChild(View child) { + // If the view had focus, it clears focus. + if (child == FocusManager.Instance.GetCurrentFocusView()) + { + FocusManager.Instance.ClearFocus(); + } // Do actual child removal Interop.Actor.Remove(SwigCPtr, View.getCPtr(child)); if (NDalicPINVOKE.SWIGPendingException.Pending) diff --git a/src/Tizen.NUI/src/public/Common/Layer.cs b/src/Tizen.NUI/src/public/Common/Layer.cs index e1d00a7cf1e..cc9629c4a58 100755 --- a/src/Tizen.NUI/src/public/Common/Layer.cs +++ b/src/Tizen.NUI/src/public/Common/Layer.cs @@ -334,6 +334,12 @@ public override void Remove(View child) Tizen.Log.Error("NUI", "You have deleted a view that is not a child of this layer."); return; } + // If the view had focus, it clears focus. + if (child == FocusManager.Instance.GetCurrentFocusView()) + { + FocusManager.Instance.ClearFocus(); + } + Interop.Actor.Remove(SwigCPtr, View.getCPtr(child)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();