Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-Enabled for iOS ViewWithMarginSetsFrameAndDesiredSizeCorrectly[SearchBar] #20275

Open
PureWeen opened this issue Jan 31, 2024 · 0 comments
Open
Assignees
Labels
area-controls-searchbar SearchBar control platform/iOS 🍎 t/bug Something isn't working
Milestone

Comments

@PureWeen
Copy link
Member

Description

The code inside the searchbarhandler.ios.cs probably needs to be changed to

public override Size GetDesiredSize(double widthConstraint, double heightConstraint)
		{
			if (double.IsInfinity(widthConstraint) || double.IsInfinity(heightConstraint))
			{
				PlatformView.SizeToFit();
				if (double.IsInfinity(widthConstraint))
				{
					widthConstraint = PlatformView.Frame.Size.Width;
				}

				if (double.IsInfinity(heightConstraint))
				{
					heightConstraint = PlatformView.Frame.Size.Height;
				}
			}

			return base.GetDesiredSize(widthConstraint, heightConstraint);
		}

similar to what we have in Editorhandler.iOS.cs

when I change it to the above code the test passes.
I don't want to make this change on our SR2 branch so I'm creating this as a tracking issue to update our main branch once we merge up the following PR #20249

@PureWeen PureWeen self-assigned this Jan 31, 2024
@Eilon Eilon added area-controls-searchbar SearchBar control legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels Mar 29, 2024
@Eilon Eilon removed Area: Platform\Xamarin VS\iOS legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 10, 2024
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-searchbar SearchBar control platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants