Skip to content

Brackets/parentheses are invisible in RichEditBox MathMode #10291

@BreeceW

Description

@BreeceW

Describe the bug

Math characters that group other expressions become invisible when typed into WinUI 3 RichEditBox with math mode. This is affecting the initial availability of math mode in Windows App SDK 1.7-experimental2. This is a regression from the system XAML (WinUI 2) math mode.

Some examples of the expressions affected:

  • Parentheses/brackets ( ) { } [ ]
  • Summation ∑
  • Integrals ∫
  • Likely many more

Steps to reproduce the bug

  1. Add a RichEditBox and set RichEditBox.TextDocument.SetMathMode(RichEditMathMode.MathOnly)
  2. Type a mathematical expression with parentheses, such as f(x)=x
  3. Notice that the parentheses become invisible once the equals key (in that example) is pressed

Also reproducible with expressions like summation:

  1. Type \sum^n (and hit space to commit)
  2. The summation ∑ becomes invisible

Expected behavior

All grouping elements should remain visible. See below screen recordings for expected behavior in UWP/WinUI 2.

Screenshots

WinUI 3 behavior Expected behavior (WinUI 2)
f(x)=x invisible parentheses f(x)=x visible parentheses
summation upper bound n invisible sigma summation upper bound n visible sigma

NuGet package version

Microsoft.WindowsAppSDK 1.7.250109001-experimental2

Windows version

Windows 11 (24H2): Build 26100

Additional context

The problem seems to be just rendering. It's still possible to type in the invisible areas, and text copied out is correct.

Metadata

Metadata

Assignees

Labels

area-TextBoxTextBox, RichEditBoxbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions