Open alexdi220 opened 3 years ago
Can I get any workaround which we can use in our code to resolve the issue on our side?
@alexdi220 Could you try the 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);
}
You should call the ShowPopupButtonClick method when you want to show the popup.
The other way is to call the SetForegroundWindow method:
[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);
}
@lindexi Great, thank you for a quick answer. Your workarounds are well but we can't use them directly in our components. But we can advise it for our customers. So still waiting for a fix.
Do you have any plans to fix that issue? Our Korean and Japanese customers facing this at time
@alexdi220 - Does it still happen for .NET 6 ?
@alexdi220 - Does it still happen for .NET 6 ?
Apologize, for the misunderstanding. I really don't mean the input delay but the placement of the IME editor - it doesn't open near the TextBox
@pchaurasia14
Hi,
Can you please share something about your plans for the issue? Do you need more details?
@DmitryRomenskiy - This is currently under investigation. We found out that the editor that is opened is tied to OS and it may be opening on the top left corner when it doesn't find the parent control handle.
We'll update this thread once we confirm the behavior and its fix.
Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
Problem description: Hi, when I place the TextBox inside the popup, it will input the letter only when the next letter is entered. Please take a look at the gif https://i.imgur.com/z9fNvHE.gif .
Actual behavior: The letter was inputted only then I pressed the next key. Reproduced in IME mode with the Korean language.
Expected behavior: The letter should be inputted immediately
Minimal repro:
NetCore_Sample.zip Framework4_8_Sample.zip