From: Bowon Ryu Date: Wed, 18 Jan 2023 06:37:40 +0000 (+0900) Subject: [NUI] fix tct block issue in text field and editor X-Git-Tag: accepted/tizen/unified/20231205.024657~499 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=5d9ceefb82c0cd958e3ff435669348f05fe718fb;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] fix tct block issue in text field and editor GetInputMethodContext() in ReleaseSwigCPtr crashes due to current changes in BaseHandle. Move DestroyContext() to Dispose to avoid this. Signed-off-by: Bowon Ryu --- diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index bae253b..0220e89 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -2544,6 +2544,8 @@ namespace Tizen.NUI.BaseComponents } TextChanged -= TextEditorTextChanged; + GetInputMethodContext()?.DestroyContext(); + base.Dispose(type); } @@ -2551,8 +2553,6 @@ namespace Tizen.NUI.BaseComponents [EditorBrowsable(EditorBrowsableState.Never)] protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { - // In order to speed up IME hide, temporarily add - GetInputMethodContext()?.DestroyContext(); Interop.TextEditor.DeleteTextEditor(swigCPtr); } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index 18d7162..bda1758 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -2550,6 +2550,7 @@ namespace Tizen.NUI.BaseComponents } TextChanged -= TextFieldTextChanged; + GetInputMethodContext()?.DestroyContext(); base.Dispose(type); } @@ -2558,8 +2559,6 @@ namespace Tizen.NUI.BaseComponents [EditorBrowsable(EditorBrowsableState.Never)] protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { - // In order to speed up IME hide, temporarily add - GetInputMethodContext()?.DestroyContext(); Interop.TextField.DeleteTextField(swigCPtr); }