summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosinputcontext.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-04-22 12:57:37 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-29 11:59:18 +0200
commit2d019ddc93c8139950c92ba09a3234f12462d024 (patch)
tree7388429a83da9e666d5d8d0bb0cabe7095475bdb /src/plugins/platforms/ios/qiosinputcontext.mm
parent195c070adf22f829697976ec8dbbfb3b5ec93305 (diff)
iOS: scroll screen after hiding keyboard programatically
When the keyboard is told to hide, we resign first responder. If this is done programatically on touch press, this will make the "hide keyboard gesture" receive a touchesCancelled instead of a touchesEnded. Since we didn't catch this from before, the gesture was left in a mixed state causing the screen not to scroll when later showing the keyboard. Change-Id: I70ed59710128a912097cd5bfbdd8f49b20b7934c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosinputcontext.mm')
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm
index 9a2c55f7f2..8be3846e06 100644
--- a/src/plugins/platforms/ios/qiosinputcontext.mm
+++ b/src/plugins/platforms/ios/qiosinputcontext.mm
@@ -229,6 +229,13 @@
[super touchesEnded:touches withEvent:event];
}
+- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
+{
+ m_touchPressWhileKeyboardVisible = NO;
+ [self performSelectorOnMainThread:@selector(touchesEndedPostDelivery) withObject:nil waitUntilDone:NO];
+ [super touchesCancelled:touches withEvent:event];
+}
+
- (void)touchesEndedPostDelivery
{
// Do some clean-up _after_ touchEnd has been delivered to QUIView