AvaloniaEdit
AvaloniaEdit copied to clipboard
StackOverflow moving scroll bar that should not be visible
Avalonia version: 0.10.18 AvaloniaEdit version: 0.10.12.2
If you add more than two text lines to the editor and resize the control to a smaller size the vertical scrollbar becomes visible even if the document is smaller than the control height.
Once the scrollbar is visible drag it to the bottom and then to the top, a StackOverflow exception happens.
Steps to reproduce:
1-Create a window with the control as content (it happens in any container) and set its alignment to stretch.
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:AvalonEdit="clr-namespace:AvaloniaEdit;assembly=AvaloniaEdit"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="testEdit.MainWindow"
Title="testEdit">
<AvalonEdit:TextEditor VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</Window>
2-Execute and add two or more lines of text. 3-Resize window to a smaller size but not so small that covers the text. 4-Scrollbar will be visible, drag it downwards and then upwards.
Testing older packages it seems that it started to fail since version 0.10.4, version 0.10.0 does not present this behavior.