mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #27250 - paulrouget:unfocus, r=jdm
Unfocus input when virtual keyboard is dismissed Fix #27181
This commit is contained in:
commit
9bbe9c837a
11 changed files with 91 additions and 2 deletions
|
@ -88,6 +88,7 @@ public:
|
|||
void ContextMenuClosed(CContextMenuResult res, unsigned int idx) {
|
||||
on_context_menu_closed(res, idx);
|
||||
}
|
||||
void IMEDismissed() { ime_dismissed(); }
|
||||
|
||||
private:
|
||||
ServoDelegate &mDelegate;
|
||||
|
|
|
@ -91,6 +91,12 @@ void ServoControl::OnLoaded(IInspectable const &, RoutedEventArgs const &) {
|
|||
|
||||
void ServoControl::InitializeTextController() {
|
||||
mInputPane = Windows::UI::ViewManagement::InputPane::GetForCurrentView();
|
||||
mInputPane->Hiding([=](const auto &, const auto &) {
|
||||
if (mLooping) {
|
||||
RunOnGLThread([=] { mServo->IMEDismissed(); });
|
||||
}
|
||||
});
|
||||
|
||||
auto manager = CoreTextServicesManager::GetForCurrentView();
|
||||
mEditContext = manager.CreateEditContext();
|
||||
mEditContext->InputPaneDisplayPolicy(CoreTextInputPaneDisplayPolicy::Manual);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue