iOS: Close the keyboard on one more event. Makes it easier to get rid of it if it gets stuck.

This commit is contained in:
Henrik Rydgård
2026-03-08 13:03:00 +01:00
parent 9e0cb93085
commit 6ad06e00a4
5 changed files with 8 additions and 0 deletions
+1
View File
@@ -61,6 +61,7 @@ void System_LaunchUrl(LaunchUrlType urlType, std::string_view url);
enum class UIEventNotification {
MENU_RETURN,
POPUP_CLOSED,
DIALOG_CLOSED,
TEXT_GOTFOCUS,
TEXT_LOSTFOCUS,
};
+4
View File
@@ -264,6 +264,10 @@ void UIDialogScreen::sendMessage(UIMessage message, const char *value) {
}
}
UIDialogScreen::~UIDialogScreen() {
System_NotifyUIEvent(UIEventNotification::DIALOG_CLOSED);
}
bool UIScreen::IsOnTop() const {
return screenManager()->topScreen() == this;
}
+1
View File
@@ -91,6 +91,7 @@ private:
class UIDialogScreen : public UIScreen {
public:
UIDialogScreen() : UIScreen(), finished_(false) {}
~UIDialogScreen() override;
bool key(const KeyInput &key) override;
void sendMessage(UIMessage message, const char *value) override;
+1
View File
@@ -209,6 +209,7 @@
}
[picker dismissViewControllerAnimated:YES completion:nil];
[self hideKeyboard];
}
+1
View File
@@ -533,6 +533,7 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string
{
switch ((UIEventNotification)param3) {
case UIEventNotification::POPUP_CLOSED:
case UIEventNotification::DIALOG_CLOSED:
[sharedViewController hideKeyboard];
break;
case UIEventNotification::TEXT_GOTFOCUS: