From 82fd1275fb813070cc420aedaa643e86d4e7e069 Mon Sep 17 00:00:00 2001 From: SungHyun Min Date: Wed, 5 Jul 2017 16:35:46 +0900 Subject: Fix Editor cursor position issue TASK=TCAPI2439 Change-Id: I6cf8ba60d74b0cd3fc72e86f1336127cdc5e5559 --- Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs | 10 +++++++--- Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'Xamarin.Forms.Platform.Tizen/Renderers') diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs index d5ca750b..39e018c5 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/EditorRenderer.cs @@ -1,4 +1,4 @@ -using System; +using System; using Xamarin.Forms.Platform.Tizen.Native; using EColor = ElmSharp.Color; @@ -32,6 +32,7 @@ namespace Xamarin.Forms.Platform.Tizen } base.OnElementChanged(e); } + protected override void Dispose(bool disposing) { if (disposing) @@ -58,6 +59,10 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateText() { Control.Text = Element.Text; + if (!Control.IsFocused) + { + Control.MoveCursorEnd(); + } } void UpdateTextColor() @@ -88,5 +93,4 @@ namespace Xamarin.Forms.Platform.Tizen Control.Keyboard = Element.Keyboard.ToNative(); } } -} - +} \ No newline at end of file diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs index 23ffca59..842aae87 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/EntryRenderer.cs @@ -18,7 +18,7 @@ namespace Xamarin.Forms.Platform.Tizen RegisterPropertyHandler(Entry.KeyboardProperty, UpdateKeyboard); RegisterPropertyHandler(Entry.PlaceholderProperty, UpdatePlaceholder); RegisterPropertyHandler(Entry.PlaceholderColorProperty, UpdatePlaceholderColor); - if(TizenPlatformServices.AppDomain.IsTizenSpecificAvailable) + if (TizenPlatformServices.AppDomain.IsTizenSpecificAvailable) { RegisterPropertyHandler("FontWeight", UpdateFontWeight); } @@ -77,6 +77,10 @@ namespace Xamarin.Forms.Platform.Tizen void UpdateText() { Control.Text = Element.Text; + if (!Control.IsFocused) + { + Control.MoveCursorEnd(); + } } void UpdateTextColor() @@ -127,4 +131,4 @@ namespace Xamarin.Forms.Platform.Tizen Control.FontWeight = Specific.GetFontWeight(Element); } } -} +} \ No newline at end of file -- cgit v1.2.3