feat: try to fix re-focus issue.

This commit is contained in:
Dong Bin
2025-01-13 15:02:23 +08:00
parent a3d14e5a31
commit 5f5b08c1aa
2 changed files with 2 additions and 21 deletions

View File

@@ -281,15 +281,9 @@ public class IPv4Box: TemplatedControl
{
if (presenter?.Bounds.Contains(position)??false)
{
_imClient.SetPresenter(presenter, this);
RaiseEvent(new TextInputMethodClientRequestedEventArgs()
{
Source = presenter,
Client = _imClient,
RoutedEvent = InputElement.TextInputMethodClientRequestedEvent,
});
if (e.ClickCount == 1)
{
_imClient.SetPresenter(presenter);
presenter.ShowCaret();
_currentActivePresenter = presenter;
var caretPosition = position.WithX(position.X - presenter.Bounds.X);