diff --git a/.changeset/loud-guests-drive.md b/.changeset/loud-guests-drive.md new file mode 100644 index 00000000000..cf9c967c186 --- /dev/null +++ b/.changeset/loud-guests-drive.md @@ -0,0 +1,5 @@ +--- +'@graphiql/react': patch +--- + +Fix: prevent default event for graphiql-doc-explorer-back link diff --git a/packages/graphiql-react/src/explorer/components/doc-explorer.tsx b/packages/graphiql-react/src/explorer/components/doc-explorer.tsx index e291ec88a70..026e7ff5ae7 100644 --- a/packages/graphiql-react/src/explorer/components/doc-explorer.tsx +++ b/packages/graphiql-react/src/explorer/components/doc-explorer.tsx @@ -70,8 +70,8 @@ export function DocExplorer() { href="#" className="graphiql-doc-explorer-back" onClick={event => { - event.preventDefault(); - pop(); + event.preventDefault(); + pop(); }} aria-label={`Go back to ${prevName}`} >