diff --git a/graphene_django/static/graphene_django/graphiql.js b/graphene_django/static/graphene_django/graphiql.js
index e38cd62..b1c8406 100644
--- a/graphene_django/static/graphene_django/graphiql.js
+++ b/graphene_django/static/graphene_django/graphiql.js
@@ -97,6 +97,6 @@
// Render into the body.
ReactDOM.render(
React.createElement(GraphiQL, options),
- document.body
+ document.getElementsByClassName("editor")[0]
);
})();
diff --git a/graphene_django/templates/graphene/graphiql.html b/graphene_django/templates/graphene/graphiql.html
index a0d0e1a..8627e0f 100644
--- a/graphene_django/templates/graphene/graphiql.html
+++ b/graphene_django/templates/graphene/graphiql.html
@@ -31,6 +31,7 @@ add "&raw" to the end of the URL within a browser.
crossorigin="anonymous">
+
{% csrf_token %}