Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[skia] TextBox doesnt work with IME #16703

Open
292390450 opened this issue May 13, 2024 · 8 comments
Open

[skia] TextBox doesnt work with IME #16703

292390450 opened this issue May 13, 2024 · 8 comments
Assignees
Labels
area/skia/text ✏️ area/skia ✏️ Categorizes an issue or PR as relevant to Skia difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/bug Something isn't working platform/wpf 🪟 Categorizes an issue or PR as relevant to WPF project/text 🔤 Categorizes an issue or PR as relevant to text (TextBox, PasswordBox, TextBlock, Fonts, …)

Comments

@292390450
Copy link

Current behavior

The text box does not accept input

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

4.1.21
6.0.18
5.0.13
5.2.13

Affected platforms

No response

IDE

Visual Studio 2022

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

Set the FeatureConfiguration.TextBox.UseOverlayOnSkia=“true”

2024-05-13.153129.mp4

can't capture focus and accept input

@292390450 292390450 added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels May 13, 2024
@Youssef1313 Youssef1313 added area/skia ✏️ Categorizes an issue or PR as relevant to Skia project/text 🔤 Categorizes an issue or PR as relevant to text (TextBox, PasswordBox, TextBlock, Fonts, …) area/skia/text ✏️ labels May 13, 2024
@ramezgerges ramezgerges self-assigned this May 13, 2024
@ramezgerges
Copy link
Contributor

I can't reproduce this with FeatureConfiguration.TextBox.UseOverlayOnSkia = true or false

@MartinZikmund
Copy link
Member

@292390450 can you please provide more detailed steps? Which OS is this - Windows/macOS/Linux? And which keyboard specifically? Can you please make a zip with a minimal repro?

@MartinZikmund MartinZikmund added triage/needs-information Indicates an issue needs more information in order to work on it. and removed triage/untriaged Indicates an issue requires triaging or verification labels May 14, 2024
@292390450
Copy link
Author

@MartinZikmund
UnoApp2.zip
os: Windows 11 Default Input
tartget net8.0-desktop

@292390450
Copy link
Author

@ramezgerges

@MartinZikmund UnoApp2.zip os: Windows 11 Default Input tartget net8.0-desktop

@Xiaoy312
Copy link
Contributor

I can also repro on windows 10 with the default Microsoft Pinyin IME.
Technically any skia-desktop app, with a TextBox would repro this...
It is able to receive normal keyboard input in alphabet, or chinese if i just copy-paste them.
But IME doesnt work, also I've noticed the ime overlay isnt aligned next the the text-box, but to the top-left of the screen.
---
For anyone working on this, here is how to add the ime for testing: // probably other languages (korean,japense) that doesnt use alphabet&variants can also repro this

  • in Settings\Language\Preferred Language, click Add a language
  • choose "Chinese (Simplified, China)", and hit Next
  • uncheck all "Optional language features" and hit Install
  • select the newly added "Chinese (Simplified, China)", and click Options
  • under "Keyboards", click "Add a keyboard" select "Microsoft PinYin"

And, to use it in the app:

  • focus the desired app
  • click on the IME icon from the system tray: // the icon may looks different depending on the current ime
    image
  • select "Microsoft PinYin"
  • back to the app, select anything capable of receiving input
  • just type any letter(s) except v followed by a number, ex: asd1

@ramezgerges
Copy link
Contributor

At the moment, we don't have IME support in general (not only Chinese).

@Xiaoy312
Copy link
Contributor

also with: FeatureConfiguration.TextBox.UseOverlayOnSkia = true;
the textbox just completely breaks:

  • the current text value is lost on focus be chinese or english
  • typing doesnt work IME or even just regular english keyboard

@Xiaoy312 Xiaoy312 changed the title skia TextBox Unable to type Chinese [skia] TextBox doesnt work with IME May 16, 2024
@Youssef1313 Youssef1313 added platform/wpf 🪟 Categorizes an issue or PR as relevant to WPF and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels May 16, 2024
@ramezgerges
Copy link
Contributor

There was a regression with all natively-hosted widgets on WPF, which also broke the TextBox overlay. It should now behave correctly and also work with IME (since it's WPF doing all the heavy lifting). I will leave this issue open since IME with the managed textbox is still needed.
@292390450 let us know if the linked PR fixes your problem

@MartinZikmund MartinZikmund added difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/skia/text ✏️ area/skia ✏️ Categorizes an issue or PR as relevant to Skia difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding kind/bug Something isn't working platform/wpf 🪟 Categorizes an issue or PR as relevant to WPF project/text 🔤 Categorizes an issue or PR as relevant to text (TextBox, PasswordBox, TextBlock, Fonts, …)
Projects
None yet
Development

No branches or pull requests

5 participants