summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiostextresponder.mm
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-12-18 12:12:58 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2014-12-18 12:12:58 +0100
commite281537f2049af0b96fd87158f2b7212afe8ab5f (patch)
tree7f9e3b14a2456cc779aa165457192094507dd257 /src/plugins/platforms/ios/qiostextresponder.mm
parente0a8b5ce88bc50440dcec2fe3a86d83e2a7dc7b0 (diff)
parent84569773db68408704193268bc42a200bb25a924 (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
Diffstat (limited to 'src/plugins/platforms/ios/qiostextresponder.mm')
-rw-r--r--src/plugins/platforms/ios/qiostextresponder.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/qiostextresponder.mm b/src/plugins/platforms/ios/qiostextresponder.mm
index 2fcc7258f7..bebc7577f8 100644
--- a/src/plugins/platforms/ios/qiostextresponder.mm
+++ b/src/plugins/platforms/ios/qiostextresponder.mm
@@ -263,10 +263,14 @@
// 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]) {
- // We have resigned the keyboard, and transferred back to the parent view, so unset focus object
+ // We have resigned the keyboard, and transferred first responder back to the parent view
Q_ASSERT(!FirstResponderCandidate::currentCandidate());
- qImDebug() << "keyboard was closed, clearing focus object";
- m_inputContext->clearCurrentFocusObject();
+ if ([self imValue:Qt::ImEnabled].toBool()) {
+ // The current focus object expects text input, but there
+ // is no keyboard to get input from. So we clear focus.
+ qImDebug() << "no keyboard available, clearing focus object";
+ m_inputContext->clearCurrentFocusObject();
+ }
} else {
// We've lost responder status because another Qt window was made active,
// another QIOSTextResponder was made first-responder, another UIView was