path: root/src
diff options
authorRichard Moe Gustavsen <>2014-04-22 12:57:37 +0200
committerThe Qt Project <>2014-04-29 11:59:18 +0200
commit2d019ddc93c8139950c92ba09a3234f12462d024 (patch)
tree7388429a83da9e666d5d8d0bb0cabe7095475bdb /src
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ø <>
Diffstat (limited to 'src')
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/ b/src/plugins/platforms/ios/
index 9a2c55f7f2..8be3846e06 100644
--- a/src/plugins/platforms/ios/
+++ b/src/plugins/platforms/ios/
@@ -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