diff --git a/src/Resources/views/Feature/explorer.html.twig b/src/Resources/views/Feature/explorer.html.twig index 9f2e5ed8..aea05446 100644 --- a/src/Resources/views/Feature/explorer.html.twig +++ b/src/Resources/views/Feature/explorer.html.twig @@ -93,6 +93,27 @@ GraphQLPlayground.init(root, config); }); + + const observer = new MutationObserver((mutations) => { + mutations.forEach((mutation) => { + if (mutation.removedNodes.length) { + mutation.removedNodes.forEach((node) => { + if ( + node.tagName === "UL" && + node.classList.contains("CodeMirror-hints") + ) { + if (!node.parentElement && mutation.target.parentElement) { + mutation.target.parentElement.removeChild(mutation.target); + } + } + }); + } + }); + }); + observer.observe(document.body, { + subtree: true, + childList: true, + });