dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.03k stars 1.16k forks source link

A problem when Korean is typed into a WPF RichTextBox. (Windows11 MS IME) #7397

Open akon47 opened 1 year ago

akon47 commented 1 year ago
  1. After selecting the text, when I type in Korean, the input does not work (NotePad is fine).

Animation

  1. When typing Hangul (Korean), there is a problem that it stops(lag) and incorrect typing occurs.

Animation

image

Expected behavior:

  1. The selected text area should be cleared and replaced with the character I typed.

  2. It shouldn't be slow and it types properly.


All issues are not reproducible with the option to use the old IME.

Animation

miloush commented 1 year ago

I don't think I can reproduce this in a simple text box (though I am on 25267). @akon47 can you provide a repro project?

akon47 commented 1 year ago

I don't think I can reproduce this in a simple text box (though I am on 25267). @akon47 can you provide a repro project?

The code in the WPF project I used to reproduce the problem is very simple.

<Window
    x:Class="RichTextBoxIssue.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    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:local="clr-namespace:RichTextBoxIssue"
    mc:Ignorable="d"
    Title="MainWindow"
    Height="450"
    Width="800"
    >
    <RichTextBox />
</Window>

I will try to reproduce by installing "Windows 11 Insider Preview Build 25267".

miloush commented 1 year ago

OK when using RichTextBox under debugger I managed to get an ArgumentException in TextStore.VerifyCharOffset when typing over selection including end of the text, which probably should not happen. However, it gets swallowed and the text gets written over nevertheless.

I think I can see the lagging, especially if in Debug mode and it correlates with messages of thread exiting.

akon47 commented 1 year ago

Any news on this issue?

akon47 commented 1 year ago

Any news on this issue? i still have a problem. (Windows11 22H2 (22624.1537) build)

miloush commented 1 year ago

After selecting the text, when I type in Korean, the input does not work (NotePad is fine).

To be clear I did not reproduce this. Can you decsribe which keys you are pressing?

akon47 commented 1 year ago

Animation

It's very simple to reproduce. I've uploaded a replay using the on-screen keyboard to show you which keys I pressed. It's not that there's a special key, it's that the same problem occurs when you press the key to start any Hangul combination.

hwankim92 commented 1 year ago

Any news on this issue?