-
Notifications
You must be signed in to change notification settings - Fork 72
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
Create key-navigation module with back handling support #883
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, think having this in foundation makes the most sense for all desktop uses. Would be nice if we did't have to rely on it being in a |
Yeah we can revise later, this seems a good start. @ashdavies can merge once you move to foundation! |
Thanks folks, yeah I think the |
Managed to verify the bug in my playground was unrelated, I'll update this PR now. |
I don't recognise this error, any clues from folks more familiar with iOS? |
No idea, that looks like a bug for the compose issue tracker :/ |
In order to provide back handling support for desktop, a key listener must be applied to the composition via
Modifier.onPreviewKeyEvent
. Previous attempts were to hook into the composition hierarchy, utilisingexpect
/actual
.However, it is possible to use the same functionality from the recently introduced gesture navigation module. The
NavDecorator
implementation delegates toNavigatorDefaults.DefaultDecoration
, whilst decorating content with the required modifier.This then makes the sample implementation redundant, thus it is removed.