Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Reuse the tabbable utility to retrieve the tabbables elements in WritingFlow #2696

Merged
merged 1 commit into from
Sep 16, 2017

Conversation

youknowriad
Copy link
Contributor

this reuses the tabbable utility to ensure a more robust arrow navigation.

Testing instructions

  • Ensure arrow navigation across blocks is working as intended (same as master)

I'm finding that the button block works better now, it used to be a caret trap but seems to work now.

@youknowriad youknowriad self-assigned this Sep 7, 2017
@codecov
Copy link

codecov bot commented Sep 7, 2017

Codecov Report

Merging #2696 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2696      +/-   ##
==========================================
+ Coverage   33.64%   33.65%   +<.01%     
==========================================
  Files         185      185              
  Lines        5584     5583       -1     
  Branches      973      972       -1     
==========================================
  Hits         1879     1879              
  Misses       3138     3138              
+ Partials      567      566       -1
Impacted Files Coverage Δ
editor/writing-flow/index.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6ceb8b...5ea104c. Read the comment docs.

.filter( ( node ) => (
node.nodeName === 'INPUT' ||
node.nodeName === 'TEXTAREA' ||
( node.isContentEditable && node.contentEditable !== 'inherit' ) ||
Copy link
Member

Choose a reason for hiding this comment

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

Could this be simplified to node.contentEditable === 'true' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@youknowriad youknowriad force-pushed the update/use-tabbable-util-in-writing-flow branch from e6b9103 to 4fe0ede Compare September 7, 2017 13:51
@youknowriad youknowriad force-pushed the update/use-tabbable-util-in-writing-flow branch from 4fe0ede to 5ea104c Compare September 7, 2017 13:51
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Discussed 1-to-1: This seems an improvement, but it's not clear to me the specific behavior we want for arrow navigations, since in some but not all cases we want the block to receive focus (i.e. when there aren't other input fields within). Or at least this is how it appears from the user's perspective. In reality, the block receives focus but then the editable takes over and steals focus to it. I think in a subsequent pull request we might want to consider consolidating this (from Editable to WritingFlow?) and being more explicit about where arrow keys should land focus for the user.

@youknowriad youknowriad merged commit 27b4555 into master Sep 16, 2017
@gziolo gziolo deleted the update/use-tabbable-util-in-writing-flow branch May 7, 2018 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants