ShortDev.Uwp.FullTrust icon indicating copy to clipboard operation
ShortDev.Uwp.FullTrust copied to clipboard

After the input of ContentDialog is forcibly enabled through ITextInputConsumer, there is a problem with normal text box input

Open Gaoyifei1011 opened this issue 1 year ago • 5 comments

After the input of ContentDialog is forcibly enabled through ITextInputConsumer, there is a problem with normal text box input

---------------------------------------------

强行通过 ITextInputConsumer 开启 ContentDialog 的输入后,普通的文本框输入存在问题


After the ContentDialog input of Xaml islands is enabled through ITextInputConsuonsumer and ITextInputProducer, the input performance of ContentDialog is normal. The TextBox of a normal window, however, repeats the input when entering characters.The application being tested uses a Window created by FrameworkView and adds controls to Window.current to display it.

---------------------------------------------

通过 ITextInputConsuonsumer 和 ITextInputProducer 开启 Xaml islands 的 ContentDialog 输入后,ContentDialog 的输入表现正常,然而普通窗口的 TextBox 在输入字符时却重复输入。测试的应用使用的是 FrameworkView 创建的窗口,并在 Window.Current 上添加控件显示的。


image image

Gaoyifei1011 avatar Jan 02 '25 08:01 Gaoyifei1011

@Gaoyifei1011 Do you have some sample code for me to test?

ShortDevelopment avatar Jan 02 '25 11:01 ShortDevelopment

@Gaoyifei1011 Do you have some sample code for me to test?

https://github.com/driver1998/XamlHost

You could refer to this project

Gaoyifei1011 avatar Jan 02 '25 11:01 Gaoyifei1011

I could reproduce the issue using your sample code, but not using a quick test with my library. I'm afraid I don't have much time to investigate this right now.

For reference: I got the ITextProducer stuff from the ICoreWindowFactory impl from CoreUIComponents.dll.

ShortDevelopment avatar Jan 02 '25 19:01 ShortDevelopment

ITextProducer

Hello, excuse me. Have you made any progress after all this time?

Gaoyifei1011 avatar Mar 20 '25 13:03 Gaoyifei1011

Hey @Gaoyifei1011 I did some tests in January and could reproduce the behavior you mentioned in your sample but not in my library. Sadly, I did not really had time to look at this since then and still did not find the difference between your sample and my code.

The latest changes (.NET 9 UWP support) are now on main. Maybe you can find the difference by comparing the ShortDev.Uwp.Compose exe with your code?

ShortDevelopment avatar Mar 22 '25 12:03 ShortDevelopment