From 5709ced6ce9e959bfbb1ad7b0352ded4c77cfe92 Mon Sep 17 00:00:00 2001 From: Bashar Astifan Date: Thu, 24 Aug 2023 15:32:32 +0400 Subject: [PATCH] Update InputHelpers.cpp --- UWP/UWPHelpers/InputHelpers.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UWP/UWPHelpers/InputHelpers.cpp b/UWP/UWPHelpers/InputHelpers.cpp index c9d2b24526..c865ff1b77 100644 --- a/UWP/UWPHelpers/InputHelpers.cpp +++ b/UWP/UWPHelpers/InputHelpers.cpp @@ -111,6 +111,11 @@ void ActivateTextEditInput(bool byFocus) { ref new Windows::UI::Core::DispatchedHandler([=]() { if (byFocus) { + // Why we should delay? (Mostly happen on XBox) + // once the popup appear, UI is reporting 3 focus events for text edit (got, lost, got) + // it might be caused by the input pane it self but anyway.. + // because this has to on UI thread and async, we will end with input pane hidden + // the small delay will ensure that last recieved event is (got focus) std::this_thread::sleep_for(std::chrono::milliseconds(100)); }