FontSize setting control should only accept a number between 0 and 128 #12038

Closed
opened 2026-01-31 03:04:38 +00:00 by claunia · 3 comments
Owner

Originally created by @carlos-zamora on GitHub (Jan 12, 2021).

Originally assigned to: @zadjii-msft on GitHub.

Steps to reproduce

  1. Go to "Appearance"
  2. Get into the font size box.
  3. Press Ctrl+Tab and it starts inserting literal tabs. Keep doing it and it becomes a super long boi to the right instead of wrapping like the same behavior in the Font Face text block.

Expected behavior

non-numeric content should not be allowed. We should only accept a number between 0 and 128.

Actual behavior

Expands to the right and tabs are inserted.

Additional Details

This is probably a simple fix. Just a matter of adding the wrap styling to CommonResources.xaml. Take a look at what wrap styling was already added to other controls. In fact, if any of the other control styles support wrap styling, feel free to add them there too.
We need to look into what kind of restrictions we can put on this control. Hopefully it supports limiting content to numbers and limiting the range to 0 and 128. Some of this may have to be filed upstream.

Originally created by @carlos-zamora on GitHub (Jan 12, 2021). Originally assigned to: @zadjii-msft on GitHub. # Steps to reproduce 1. Go to "Appearance" 2. Get into the font size box. 3. Press Ctrl+Tab and it starts inserting literal tabs. Keep doing it and it becomes a super long boi to the right instead of wrapping like the same behavior in the Font Face text block. # Expected behavior non-numeric content should not be allowed. We should only accept a number between 0 and 128. # Actual behavior Expands to the right and tabs are inserted. # Additional Details ~This is probably a simple fix. Just a matter of adding the wrap styling to CommonResources.xaml. Take a look at what wrap styling was already added to other controls. In fact, if any of the other control styles support wrap styling, feel free to add them there too.~ We need to look into what kind of restrictions we can put on this control. Hopefully it supports limiting content to numbers and limiting the range to 0 and 128. Some of this may have to be filed upstream.
Author
Owner

@DHowett commented on GitHub (Jan 12, 2021):

Sorry, is the bug that it doesn't wrap or that you can enter non-numeric content in it such that it needs to wrap? It only ever contains a single number between 0 and 128. There's no need for it to wrap.

@DHowett commented on GitHub (Jan 12, 2021): Sorry, is the bug that it doesn't wrap or that you can enter non-numeric content in it such that it needs to wrap? It only ever contains a single number between 0 and 128. There's no need for it to wrap.
Author
Owner

@carlos-zamora commented on GitHub (Jan 12, 2021):

Sorry, is the bug that it doesn't wrap or that you can enter non-numeric content in it such that it needs to wrap? It only ever contains a single number between 0 and 128. There's no need for it to wrap.

Good point. If we only ever accept a value between 0 and 128. We should make the control enforce that (if possible). Updating issue appropriately.

@carlos-zamora commented on GitHub (Jan 12, 2021): > Sorry, is the bug that it doesn't wrap or that you can enter non-numeric content in it such that it needs to wrap? It only ever contains a single number between 0 and 128. There's no need for it to wrap. Good point. If we only ever accept a value between 0 and 128. We should make the control enforce that (if possible). Updating issue appropriately.
Author
Owner

@zadjii-msft commented on GitHub (Jan 12, 2021):

Alright so 90% of this issue is tracked upstream at microsoft/microsoft-ui-xaml#3466.

The Min/Max thing, that we can do.

@zadjii-msft commented on GitHub (Jan 12, 2021): Alright so 90% of this issue is tracked upstream at microsoft/microsoft-ui-xaml#3466. The Min/Max thing, that we _can_ do.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12038