Skip to content

RichEditBox math mode content of matrix disappears #10351

@gaviny82

Description

@gaviny82

Describe the bug

In the math mode of RichEditBox, the last row of a matrix with 3 rows disappears if content is added to the first row.

Image Image Image

Equations: ⁅■8(&&@&&@&&)⁆, ⁅■8(1&2&3@&&@&&)⁆, ⁅■8(1&2&3&4@&&&@&&&)⁆

The matrix can display correctly if the first row is left empty, or something larger is entered:

Image Image Image
Equations: ⁅■8(&&@4&5&6@1&2&3)⁆, ⁅■8(1&2&3@&&@&&)+■8(1@2@3@4)⁆, ⁅■8(1&2&3@&&@&&)+∑_𝑖⁆

This issue only affects matrices of 3 rows. Matrices of other sizes can be displayed correctly:

Image Image

Equation: ⁅■8(1&2&3&4@&&&@&&&@5&6&7&8)⁆, ⁅■8(1&2&3@&&@&&@4&5&6)⁆

Steps to reproduce the bug

  1. Create a WinUI 3 App project with Window App SDK 1.7.
  2. Add a RichEditBox with a reasonable size to the page.
<RichEditBox x:Name="editor" Width="800" Height="500" />
  1. Set the RichEditBox to math mode.
public sealed partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        editor.Document.SetMathMode(RichEditMathMode.MathOnly);
    }
}
  1. Create a matrix with 3 rows and add elements to the first row. Test the sample equations in the description.

Expected behavior

Screenshots from OneNote:

Image Image

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.7 Preview 1: 1.7.250606001, 1.8.250702007-experimental4

Windows version

Windows 11 (24H2): Build 26100

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue needs to be triaged by the area owners

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions