Skip to content

Commit

Permalink
Global styles: do not navigate twice to home screen when opening the …
Browse files Browse the repository at this point in the history
…sidebar (#65523)

* Global styles: do not navigate twice to home screen on sidebar load

* Remove whole default block

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
  • Loading branch information
4 people authored Sep 24, 2024
1 parent 7493185 commit 096c883
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/edit-site/src/components/global-styles/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,19 +272,6 @@ function GlobalStylesEditorCanvasContainerLink() {
goTo( '/' );
}
break;
default:
/*
* Example: the user has navigated to "Browse styles" or elsewhere
* and changes the editorCanvasContainerView, e.g., closes the style book.
* The panel should not be affected.
* Exclude revisions panel from this behavior,
* as it should close when the editorCanvasContainerView doesn't correspond.
*/
if ( path !== '/' && ! isRevisionsOpen ) {
return;
}
goTo( '/' );
break;
}
}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );
}
Expand Down

0 comments on commit 096c883

Please sign in to comment.