-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Preferences: The back button in the preferences modal doesn't appear to work #65109
Comments
The preferences modal navigation in the mobile layout is implemented here. I then identified that this problem was caused by #63317. After a bit of research, it seems that the issue can be resolved by explicitly adding slashes to the diff --git a/packages/preferences/src/components/preferences-modal-tabs/index.js b/packages/preferences/src/components/preferences-modal-tabs/index.js
index f70430367c..d87e565f5e 100644
--- a/packages/preferences/src/components/preferences-modal-tabs/index.js
+++ b/packages/preferences/src/components/preferences-modal-tabs/index.js
@@ -110,7 +110,7 @@ export default function PreferencesModalTabs( { sections } ) {
return (
<NavigatorButton
key={ tab.name }
- path={ tab.name }
+ path={ `/${ tab.name }` }
as={ Item }
isAction
>
@@ -142,7 +142,7 @@ export default function PreferencesModalTabs( { sections } ) {
return (
<NavigatorScreen
key={ `${ section.name }-menu` }
- path={ section.name }
+ path={ `/${ section.name }` }
>
<Card isBorderless size="large">
<CardHeader Maybe it has to do with stricter pattern matching, as this comment suggests. |
Nice sleuthing @t-hamano @andrewserong if you don't have time, I can get a quick PR up this morning |
@ramonjd, I'm happy to do it! I'll give you a ping when it's up 🙂 |
Thank you folks 🙌 |
Thank you, folks! The need for a URL-like |
Description
While testing on a narrower viewport, I noticed that the back button in the Preferences modal doesn't appear to work. Tapping / clicking the button doesn't appear to get the user back to the top level of the hierarchy.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
2024-09-06.16.17.26.mp4
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: