diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44944.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44944.cs new file mode 100644 index 000000000..a05ea81bc --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44944.cs @@ -0,0 +1,36 @@ +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; + +#if UITEST +using Xamarin.UITest; +using NUnit.Framework; +#endif + +namespace Xamarin.Forms.Controls +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 44944, "iOS: Text goes outside the bounds of Entry if it can't fit inside", PlatformAffected.iOS)] + public class Bugzilla44944 : TestContentPage + { + protected override void Init() + { + Content = new Grid + { + Children = + { + new Label + { + Text = @"Tap the Entry, type some text, and type anywhere on the screen to dismiss the keyboard. Even though it has a large fontsize (200), the text should not go outside the bounds of the Entry. Instead, it should be clipped by the Entry.", + VerticalOptions = LayoutOptions.Start + }, + new Entry + { + FontSize = 200, + HorizontalOptions = LayoutOptions.Center, + VerticalOptions = LayoutOptions.Center + } + } + }; + } + } +} \ No newline at end of file diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems index bc656f779..fb70cf672 100644 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems @@ -128,6 +128,7 @@ + diff --git a/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs index 6c75587e3..c56060ae6 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs @@ -45,6 +45,7 @@ namespace Xamarin.Forms.Platform.iOS _defaultTextColor = textField.TextColor; textField.BorderStyle = UITextBorderStyle.RoundedRect; + textField.ClipsToBounds = true; textField.EditingChanged += OnEditingChanged;