HathorNetwork / hathor-wallet-mobile

Hathor official mobile wallet
https://hathor.network/
MIT License
26 stars 24 forks source link

Feat: Allow user to close numeric keyboard on iOS #407

Closed tuliomir closed 10 months ago

tuliomir commented 10 months ago

Summary

As described in #402 , the user is unable to close the numeric keyboard on iOS. On some occasions this causes a bad user experience.

This PR fixes this by adding a press event handler on the screens that exhibit a numeric keyboard.

Acceptance Criteria

[!TIP] In total, just a few lines had actual text modified. The rest of the modified lines were only due to indentation adjustments. To better visualize the actual changes I suggest using the "Hide whitespace" feature on GitHub, as it highlights only the words that were changed on this file, and not the indentation adjustments that were necessary:

Ignore Whitespace Diff

Demonstration

Although the video does not exhibit the finger press locations, it's possible to understand the overall interaction: by pressing anywhere on the screen other than the numeric input, the user is able to close the numeric keyboard.

https://github.com/HathorNetwork/hathor-wallet-mobile/assets/1299409/3bb39761-7713-41dc-a35d-4c77dcfcde29

Security Checklist

alexruzenhack commented 10 months ago

[non-blocking] Why is this detrimental for the experience? This screen has only one purpose: informe the value.

tuliomir commented 10 months ago

@alexruzenhack This was causing issues when, for some reason, the keyboard got in the way of the elements being shown on screen, such as a button.

The main solution to this problem was implemented on #325 , but the option to hide the keyboard was still to be added.