path: root/src/plugins/platforms
diff options
authorMarkus Goetz <>2015-12-14 09:58:04 +0100
committerSimon Hausmann <>2015-12-17 13:47:23 +0000
commite78ca787ae459f2769a6b0126dad4700408bfb46 (patch)
treea93d2e123376f59b07228b3eb433a99b051ddc20 /src/plugins/platforms
parent8885344ad48abe9a707868ce5677f32b05338a50 (diff)
iOS: Clear focusObject if first responder is set to null
In certain cases we were still showing a cursor in a TextInput even though the keyboard was hidden programmatically. Change-Id: I48ebb6b8bc0382236b1ea5835e68eae48ece2b4f Reviewed-by: Tor Arne Vestbø <>
Diffstat (limited to 'src/plugins/platforms')
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/ b/src/plugins/platforms/ios/
index e6ea43652f..320b1cac61 100644
--- a/src/plugins/platforms/ios/
+++ b/src/plugins/platforms/ios/
@@ -318,7 +318,11 @@
// a regular responder transfer to another window. In the former case, iOS
// will set the new first-responder to our next-responder, and in the latter
// case we'll have an active responder candidate.
- if ([UIResponder currentFirstResponder] == [self nextResponder]) {
+ if (![UIResponder currentFirstResponder]) {
+ // No first responder set anymore, sync this with Qt by clearing the
+ // focus object.
+ m_inputContext->clearCurrentFocusObject();
+ } else if ([UIResponder currentFirstResponder] == [self nextResponder]) {
// We have resigned the keyboard, and transferred first responder back to the parent view
if ([self currentImeState:Qt::ImEnabled].toBool()) {