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

Fix zero width textbox throwing in updateImeWindowPosition() #5311

Merged
merged 2 commits into from
Jul 18, 2022

Conversation

Susko3
Copy link
Member

@Susko3 Susko3 commented Jul 18, 2022

Math.Clamp could fail if the usable text area was considered negative ($\textup{DrawWidth} - 2 \times \textup{LeftRightPadding} < 0$).

Spotted on discord:

System.ArgumentException: '16' cannot be greater than -16.
   at System.Math.ThrowMinMaxException[T](T min, T max)
   at osu.Framework.Graphics.UserInterface.TextBox.updateImeWindowPosition()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()

Math.Clamp could fail if the usable text area was considered negative.
@peppy peppy enabled auto-merge July 18, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants