Skip to content

[iOS] Deactivate Tab and Shift+Tab key shortcuts#889

Merged
etoledom merged 3 commits intodevelopfrom
issue/deactivate-tab-shifttab-key-shortcuts
Apr 18, 2019
Merged

[iOS] Deactivate Tab and Shift+Tab key shortcuts#889
etoledom merged 3 commits intodevelopfrom
issue/deactivate-tab-shifttab-key-shortcuts

Conversation

@etoledom
Copy link
Copy Markdown
Contributor

@etoledom etoledom commented Apr 18, 2019

Fixes a part of #888

Related Aztec PR: wordpress-mobile/AztecEditor-iOS#1175

This PR removes the Tab and Shift+Tab key shortcuts.
On a second iteration of the ListBlock, we will want to reactivate them using gutenberg internal mechanism.

I also removed the Tab key functionality completely. It was adding tab characters to the content of blocks, and also breaking the ListBlock. This is different to how it works on Android and Web, so I don't see any harm on deactivating it until we handle it properly (cc @hypest )

IMHO, the functionality we want for the Tab key in this case is to move the focus to the next block, in the same way it works on web.

To test Tabs:

  • Run the iOS example project on the simulator.
  • Focus a RichText powered block.
  • Press the Tab key (be sure to have the hardware keyboard connected to the simulator)
  • Check that nothing happens.

To test Shift+Tabs:

  • Replace the HTML content with this one:
<!-- wp:list -->
<ul><li>Hello<ul><li>world</li></ul></li></ul>
<!-- /wp:list -->
  • Set the cursor in the indented list item.
  • Press Shift+Tab in the hardware keyboard.
  • Check that it doesn't modify the ListBlock.

@etoledom etoledom added this to the v1.3 milestone Apr 18, 2019
@etoledom etoledom requested a review from pinarol April 18, 2019 10:36
@etoledom etoledom self-assigned this Apr 18, 2019
Copy link
Copy Markdown
Contributor

@pinarol pinarol left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉 Thanks!

@etoledom etoledom merged commit c55cda6 into develop Apr 18, 2019
@etoledom
Copy link
Copy Markdown
Contributor Author

Thank you!

@etoledom etoledom deleted the issue/deactivate-tab-shifttab-key-shortcuts branch April 18, 2019 15:55
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.

2 participants