-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Site Editor: Navigator's goTo function called twice when navigating screens in the sidebar #51760
Copy link
Copy link
Closed
Labels
[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")Related to the overarching Site Editor (formerly "full site editing")[Package] Edit Site/packages/edit-site/packages/edit-site[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
When interacting with the sidebar in the site editor, clicking buttons to navigate to a new screen seems to call the underlying goTo function twice:
- one call is triggered (correctly) by
NavigatorButton, used to render those buttons - one extra call seems to be triggered by the
useSyncPathWithURLhook, in particular by this line of code
Calling goTo twice can prevent Navigator from working as expected — for example, when navigating to the previous/parent screen, the focus is currently not being restored correctly on the button that triggered the previous navigation
cc @youknowriad
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Site EditorRelated to the overarching Site Editor (formerly "full site editing")Related to the overarching Site Editor (formerly "full site editing")[Package] Edit Site/packages/edit-site/packages/edit-site[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.