iOS: Be more careful when hiding the keyboard upon enter
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>
Fri, 23 May 2014 08:51:19 +0000 (10:51 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 23 May 2014 12:46:19 +0000 (14:46 +0200)
commit28f32afd3fed07c7772b76faf731bb104810d934
treec37c6a072dba2cb012d45bb11b8ffe835e992be1
parentcf4d0a64e9909ff3c989a77f5d297dadc76e58e2
iOS: Be more careful when hiding the keyboard upon enter

A typical pattern in an application is to listen
for "enter" in a line edit and transfer focus to
the next edit in the focus chain. This would currently
not work on iOS since we would force the keyboard down
after delivering the KeyPress/release events, effectively
overriding any focus handling done by the app.

This patch will hide the keyboard _before_ sending the
events, so that we don't override focus handling done
by the app. By also hiding the keyboard using
QInputMethod, the hiding will also be delayed a bit
(in QIOSInputContext) to catch subsequent hide/show calls.

Change-Id: Ic19511d494a55d1bda963ed9bc7185d63b51bc03
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
src/plugins/platforms/ios/quiview_textinput.mm