Editor control does not show all the text after increasing its height on Windows
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
Description
If an Editor control height is smaller than the displayed text, and then is resized, the text is still displayed only in the initial rectangle and does not fill the control.
Initial window size - all the text fits and is displayed.
Resize the window to be smaller than the text.
Resize it again to a bigger window. The text is still displayed and scrolled in the rectangle from the smaller window size.
Steps to Reproduce
-
Create a new .NET MAUI application.
-
Change the MainPage.xaml to
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.MainPage">
<Grid>
<Editor x:Name="editor"/>
</Grid>
</ContentPage>
- Populate the Editor control text:
public MainPage()
{
InitializeComponent();
editor.Text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n" +
"Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n" +
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n" +
"Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.\n" +
"Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
}
-
Compile and run the application.
-
Resize the window so that the text does not fit and can be scrolled
-
Resize the window back to a larger size. The text should fit and be fully displayed, but is not.
Link to public reproduction project repository
No response
Version with bug
10.0.70
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows SDK 10.0.19041.0
Did you find any workaround?
Wrapping the Editor control in a ScrollView can resolve the issue.
Relevant log output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue on Windows with the provided MainPage.xaml and Editor text, resizing the window smaller and then larger. Trace the Editor's resize behavior in the .NET MAUI repository and add or run coverage for the repro; done means the text uses the control's enlarged area and is fully displayed after resizing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100