Conversation
|
Finally 👍 |
|
@amgleitman / @msand is there any chance to get this merged in? We'd really like to see this fix in cause it would solve some major UX issues. |
|
Would love to get this integrated too. Forms are not lot of fun if you're using svg. |
|
I took these changes and created a patch you can apply to 12.1.1 with patch-package to fix this in your project today. (The patch also includes a few newer commits from the |
|
Thank-you @ioveracker I will check it out! |
|
Something new here? |
|
Same question here, will this get merged? |
|
I don't like being part of bumpers, but bump. I'm using a lot of ts-ignores now and I'm afraid I might get attacked by the other devs if I keep adding them. |
|
#1294 guess also talks about the same issue and give better workaround |
|
Would love to get this merged, but a temp workaround is adding |
|
@brentvatne Any chance you could release a version of this lib with this fix? |
|
Hopping on the bump bandwagon, I would love to see this patched 👍🏻 |
|
@kmagiera @WoLewicki Is there any chance one of you could merge in this fix? This would help a whole lot with cleaning up our code. |
| const numTouchKeys = touchKeys.length; | ||
|
|
||
| export default (target: { [x: string]: unknown; state: unknown }) => { | ||
| const hasTouchableProperty = getHasTouchableProperty(target.props); |
There was a problem hiding this comment.
Maybe we should apply those changes only on web? Or does it not change anything on native platforms?
There was a problem hiding this comment.
Thanks for catching it. Updated!
WoLewicki
left a comment
There was a problem hiding this comment.
LGTM 🎉 Thanks for this PR @intergalacticspacehighway
Fixes #1471
Summary
As described in #1471, each SVG element is focusable/tabable on web by default. This can create issues in keyboard navigation.
As explained by @jondkoon #1471 (comment), the TouchableMixin attaches blur handler which makes SVG elements focusable.
So, to solve this, we only attach touchable mixin handlers if the element has any touchable props.
Test Plan
Before:
Each element is focusable
Screen.Recording.2021-05-11.at.12.45.41.AM.mov
After:
No element is focusable
Screen.Recording.2021-05-11.at.12.47.36.AM.mov
What's required for testing (prerequisites)?
What are the steps to reproduce (after prerequisites)?
Compatibility
Checklist
README.md__tests__folder