We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e86dc4 commit fc7de5aCopy full SHA for fc7de5a
.changeset/sharp-rules-hide.md
@@ -0,0 +1,5 @@
1
+---
2
+'codemirror-graphql': patch
3
4
+
5
+tooltip a tag's click listener calls event.preventDefault() to stop navigating away from page
packages/codemirror-graphql/src/info.ts
@@ -299,6 +299,9 @@ function text(
299
// want clicking the node to navigate anywhere.
300
node.href = 'javascript:void 0'; // eslint-disable-line no-script-url
301
node.addEventListener('click', (e: MouseEvent) => {
302
+ // Although an href of 'javascript:void 0' should never navigate away from the page,
303
+ // that is not always the case: https://github.com/graphql/graphiql/issues/3565
304
+ e.preventDefault();
305
onClick(ref, e);
306
});
307
} else {
0 commit comments