fix(android): the back key folds the keyboard before anything else
It was our own handler. The web view is not a field the system knows, so it does not intercept the key for us - it arrives here, and we consumed it in every case: the vault locked, or the list came back, while the keyboard stayed up with no way left to close it. hideSoftInputFromWindow answers whether there was anything to fold, which is the synchronous signal needed to decide. Something folded, key eaten; nothing folded, the key keeps its usual meaning. Measured on the device, before and after: mInputShown stayed true, it now goes false and the application stays in front. A second press locks, as before.
This commit is contained in:
+10
@@ -379,6 +379,16 @@ procedure TForm8.OnHardwareBack(Sender: TObject; var Key: Word;
|
||||
begin
|
||||
if Key <> vkHardwareBack then Exit;
|
||||
if not FLayWeb.Visible then Exit;
|
||||
// LE CLAVIER D'ABORD. Quand il est deplie, cette touche est le bouton qui le
|
||||
// replie - c'est tout ce qu'elle veut dire. La vue web n'etant pas un champ
|
||||
// que le systeme connait, il ne l'intercepte pas pour nous : on verrouillait
|
||||
// le coffre pendant que le clavier restait en place, sans plus aucun moyen de
|
||||
// le refermer.
|
||||
if HideSoftKeyboard then
|
||||
begin
|
||||
Key := 0;
|
||||
Exit;
|
||||
end;
|
||||
// C'est la PAGE qui sait ce qu'elle affiche - Delphi ne le devine pas. Elle
|
||||
// le declare a chaque changement de vue (cmd://state).
|
||||
if FWebView = 'detail' then
|
||||
|
||||
Reference in New Issue
Block a user