Revert "[NUI] If the view had focus when it was unparented, the focus is cleared...
authorjoogab.yun <joogab.yun@samsung.com>
Wed, 17 Jul 2024 06:21:07 +0000 (15:21 +0900)
committerJoogabYun <40262755+JoogabYun@users.noreply.github.com>
Wed, 24 Jul 2024 01:42:43 +0000 (10:42 +0900)
This reverts commit 09f52bc8bdea3e4e50b610c0b6bc18b54104feb4.

This operation is moved to the DALi.
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-toolkit/+/314664/

src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs
src/Tizen.NUI/src/public/Common/Layer.cs

index 32867f5cf4359c6eda51941c356070bc53ee0477..b34f3f339a08240b48c8edc3a78632674e1df2f8 100755 (executable)
@@ -1143,12 +1143,6 @@ namespace Tizen.NUI.BaseComponents
 
         internal void RemoveChild(View child)
         {
-            // If the view had focus, it clears focus.
-            if (child == FocusManager.Instance.GetCurrentFocusView())
-            {
-                Tizen.Log.Debug("NUI", $"ClearFocus due to View id:({child.ID}) removed from scene\n");
-                FocusManager.Instance.ClearFocus();
-            }
             // Do actual child removal
             Interop.Actor.Remove(SwigCPtr, View.getCPtr(child));
             if (NDalicPINVOKE.SWIGPendingException.Pending)
index 828ba47847456b87dd1b32e0f3b810e712213746..eadf02152ea8704095d0b4086bc52c81dc141297 100755 (executable)
@@ -348,12 +348,6 @@ namespace Tizen.NUI
                 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();