Open SreemonPremkumarMuthukrishnan opened 2 months ago
@SreemonPremkumarMuthukrishnan Could you try my code:
[DllImport("User32.dll")]
public static extern IntPtr SetFocus(IntPtr hWnd);
IntPtr GetHwnd(Popup popup)
{
HwndSource source = (HwndSource)PresentationSource.FromVisual(popup.Child);
return source.Handle;
}
private void ShowPopupButtonClick(object sender, RoutedEventArgs e)
{
ThePopup.IsOpen = true;
IntPtr handle = GetHwnd(ThePopup);
SetFocus(handle);
}
Or
[DllImport("USER32.DLL")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetForegroundWindow(IntPtr hWnd);
public static void ActivatePopup(Popup popup)
{
HwndSource source = (HwndSource)PresentationSource.FromVisual(popup.Child);
IntPtr handle = source.Handle;
SetForegroundWindow(handle);
}
You can find my code demo in : https://github.com/lindexi/lindexi_gd/tree/1666e742fbd5ebda36e840a8e5f4b866251b3004/GakelfojeNairwogewerwhiheecem
Description
When I type a Korean letter inside the TextBox control, which is loaded inside the PopUp control, the first typed letter is not updated in the TextBox. When I type the second letter, both the first and the second letters are updated. This behavior continues with further typing.
Please find the code snippet below:
Please find the sample to replicate the issue:
KoreanIEM_SimpleSample.zip
Please find the video reference below:
https://github.com/dotnet/wpf/assets/104507189/2e1561a1-b455-49cb-abcc-35df7a59643a
Reproduction Steps
Expected behavior
The Korean letter should be able to update simultaneously when typing.
Actual behavior
The Korean letter shouldn't to update simultaneously when typing.
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
.NET version -> .NET framework 4.8.1 OS version -> Windows 11 Enterprise & Version - 22H2
Other information
No response