Commit 6b8e263b authored by Jérome Perrin's avatar Jérome Perrin

monaco_editor: put body before head

document.body is accessed very early in scripts loading, in
https://github.com/microsoft/vscode/blob/c6e3a94892eaccbce9995ee02a06febec5492fec/src/vs/editor/contrib/suggest/suggestRangeHighlighter.ts#L106
if we leave body after head, for some reason document.body is null here
and loading fail, which leaves an editor where things like Ctrl+Space
does not trigger completions

Moving body before head is just a workaround, but that was code was
removed in
https://github.com/microsoft/vscode/commit/f913854bd66362a1350ea43c305ad92c151796bf
hopefully when we update to monaco > 0.20.0 that won't be needed again.
parent 117e8487
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<!--
XXX body is added before head to workaround an issue with monaco 0.20.0.
Should be OK to put after head once we update again to > 0.20.0
-->
<body style="margin: 0;">
<div class="monaco-container" style="width:100vw;height:calc(100vh - 30px);border:1px solid grey;"></div>
</body>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
...@@ -22,9 +31,5 @@ ...@@ -22,9 +31,5 @@
<script src="monaco-editor/app.bundle.min.js"></script> <script src="monaco-editor/app.bundle.min.js"></script>
<script src="monaco-editor.gadget.js"></script> <script src="monaco-editor.gadget.js"></script>
</head> </head>
<body style="margin: 0;">
<div class="monaco-container" style="width:100vw;height:calc(100vh - 30px);border:1px solid grey;"></div>
</body>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment