Skip to content

[iOS]: Make Hide-Keyboard button work again after dismissing Links UI.#784

Merged
etoledom merged 3 commits intodevelopfrom
issue/702-hide-keyboard-button-after-links-ui
Mar 29, 2019
Merged

[iOS]: Make Hide-Keyboard button work again after dismissing Links UI.#784
etoledom merged 3 commits intodevelopfrom
issue/702-hide-keyboard-button-after-links-ui

Conversation

@etoledom
Copy link
Copy Markdown
Contributor

fixes #702

This PR fixes an issue that made the Hide-Keyboard toolbar button not work after the Links UI bottom-sheet was dismissed.
Additionally, now on both platform, dismissing the keyboard with this button will clear the block selection.

hide-keyboard

To test (iOS):

  • Select a paragraph block.
  • Present the Links UI (pressing the links button on the toolbar).
  • Dismiss the Links UI bottom-sheet.
  • Press the hide-keyboard button on the toolbar.
  • Check that the button works and the keyboard is dismissed.
  • Check that the block is now deselected.

To test (Android):
Note: On Android, the keyboard is already hidden after dismissing the Links UI.

  • Select a paragraph block.
  • Press the hide-keyboard button on the toolbar.
  • Check that the keyboard is dismissed.
  • Check that the block is now deselected.

@etoledom etoledom added this to the v1.2 milestone Mar 26, 2019
@etoledom etoledom self-assigned this Mar 26, 2019
Copy link
Copy Markdown
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working correctly on iOS.

@etoledom
Copy link
Copy Markdown
Contributor Author

etoledom commented Mar 28, 2019

@daniloercoli or @mzorz or @marecar3 could you please check the Android side?
Thank you!

@marecar3
Copy link
Copy Markdown
Contributor

marecar3 commented Mar 28, 2019

Hey @etoledom, nice work here! :)

I just found one case on Android platform which is maybe interesting.
If you tap on Back button (Hardware/Software) on Android, it will dismiss the keyboard, but the block will be still in focus. Some users will probably click on the Back button, so maybe we should cover that case also, WDYT?

@etoledom
Copy link
Copy Markdown
Contributor Author

@marecar3 - Thanks for the review!

so maybe we should cover that case also, WDYT?

Sounds good! I'll check that out.

@etoledom
Copy link
Copy Markdown
Contributor Author

@marecar3 - I gave your suggestion a try, but it's more complicated than I thought.

The react-native BackHandler component won't help us here, since it works only when the Android Back button is on "Back mode` (with the arrow pointing to the left) and not when it's on "Hide Keyboard" mode (with the arrow pointing down).

I searched for a way to intercept that button on "Hide Keyboard" mode, and I couldn't find any. I also tried using keyboard events, but those are too generic, and we don't want to unselect the block for every time the keyboard is dismissed (i.e. presenting the Links UI).

I'd suggest to create a new ticket for this, since it's not actually related to our Hide Keyboard toolbar button, and it seems to not be a simple fix.

Copy link
Copy Markdown
Contributor

@marecar3 marecar3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @etoledom, thanks for the extra effort here.
Let's merge this one and create a new ticket as you suggested! :)

@etoledom etoledom merged commit 89c9be2 into develop Mar 29, 2019
@etoledom
Copy link
Copy Markdown
Contributor Author

Thank you both! :)

@etoledom etoledom deleted the issue/702-hide-keyboard-button-after-links-ui branch March 29, 2019 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dismissing Links UI (BottomSheet) disables hide keyboard button.

3 participants